]> git.ipfire.org Git - thirdparty/systemd.git/blame - shell-completion/zsh/_systemd-run
Merge pull request #2760 from ronnychevalier/rc/core_no_new_privileges_seccompv3
[thirdparty/systemd.git] / shell-completion / zsh / _systemd-run
CommitLineData
d74ab852
RC
1#compdef systemd-run
2
3__systemctl() {
4 local -a _modes
5 _modes=("--user" "--system")
6 systemctl ${words:*_modes} --full --no-legend --no-pager "$@" 2>/dev/null
7}
8
9__get_slices () {
10 __systemctl list-units --all -t slice \
11 | { while read -r a b; do echo $a; done; };
12}
13
14__slices () {
15 local -a _slices
16 _slices=(${(fo)"$(__get_slices)"})
17 typeset -U _slices
18 _describe 'slices' _slices
19}
20
21_arguments \
22 {-h,--help}'[Show help message]' \
23 '--version[Show package version]' \
24 '--user[Run as user unit]' \
f49e8bc4 25 {-H+,--host=}'[Operate on remote host]:[user@]host:_sd_hosts_or_user_at_host' \
c0fd7cbd 26 {-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \
d74ab852
RC
27 '--scope[Run this as scope rather than service]' \
28 '--unit=[Run under the specified unit name]:unit name' \
5ffd7671
NC
29 {-p+,--property=}'[Set unit property]:NAME=VALUE:(( \
30 CPUAccounting= MemoryAccounting= BlockIOAccounting= SendSIGHUP= \
31 SendSIGKILL= MemoryLimit= CPUShares= BlockIOWeight= User= Group= \
32 DevicePolicy= KillMode= DeviceAllow= BlockIOReadBandwidth= \
33 BlockIOWriteBandwidth= BlockIODeviceWeight= Nice= Environment= \
34 KillSignal= LimitCPU= LimitFSIZE= LimitDATA= LimitSTACK= \
35 LimitCORE= LimitRSS= LimitNOFILE= LimitAS= LimitNPROC= \
36 LimitMEMLOCK= LimitLOCKS= LimitSIGPENDING= LimitMSGQUEUE= \
37 LimitNICE= LimitRTPRIO= LimitRTTIME= PrivateTmp= PrivateDevices= \
38 PrivateNetwork= NoNewPrivileges= WorkingDirectory= RootDirectory= \
39 TTYPath= SyslogIdentifier= SyslogLevelPrefix= SyslogLevel= \
40 SyslogFacility= TimerSlackNSec= OOMScoreAdjust= ReadWriteDirectories= \
7e7cd252 41 ReadOnlyDirectories= InaccessibleDirectories= EnvironmentFile= \
b4c14404 42 ProtectSystem= ProtectHome= RuntimeDirectory= PassEnvironment= \
5ffd7671 43 ))' \
d74ab852
RC
44 '--description=[Description for unit]:description' \
45 '--slice=[Run in the specified slice]:slices:__slices' \
46 {-r,--remain-after-exit}'[Leave service around until explicitly stopped]' \
47 '--send-sighup[Send SIGHUP when terminating]' \
a80cea68
RC
48 '--service-type=[Service type]:type:(simple forking oneshot dbus notify idle)' \
49 '--uid=[Run as system user]:user:_users' \
50 '--gid=[Run as system group]:group:_groups' \
51 '--nice=[Nice level]:nice level' \
52 '--setenv=[Set environment]:NAME=VALUE' \
53 '--on-active=[Run after SEC seconds]:SEC' \
54 '--on-boot=[Run after SEC seconds from machine was booted up]:SEC' \
55 '--on-statup=[Run after SEC seconds from systemd was first started]:SEC' \
56 '--on-unit-active=[Run after SEC seconds from the last activation]:SEC' \
57 '--on-unit-inactive=[Run after SEC seconds from the last deactivation]:SEC' \
58 '--on-calendar=[Realtime timer]:SPEC' \
59 '--timer-property=[Set timer unit property]:NAME=VALUE' \
d74ab852 60 '*::command:_command'