_systemd-run revision 7e7cd2526d9deb7d607854212a1573cff737ce00
549ec3fff108310966327d1dc9004551b63210b7dougm#compdef systemd-run
549ec3fff108310966327d1dc9004551b63210b7dougm
549ec3fff108310966327d1dc9004551b63210b7dougm__systemctl() {
549ec3fff108310966327d1dc9004551b63210b7dougm local -a _modes
549ec3fff108310966327d1dc9004551b63210b7dougm _modes=("--user" "--system")
549ec3fff108310966327d1dc9004551b63210b7dougm systemctl ${words:*_modes} --full --no-legend --no-pager "$@" 2>/dev/null
549ec3fff108310966327d1dc9004551b63210b7dougm}
549ec3fff108310966327d1dc9004551b63210b7dougm
549ec3fff108310966327d1dc9004551b63210b7dougm__get_slices () {
549ec3fff108310966327d1dc9004551b63210b7dougm __systemctl list-units --all -t slice \
549ec3fff108310966327d1dc9004551b63210b7dougm | { while read -r a b; do echo $a; done; };
549ec3fff108310966327d1dc9004551b63210b7dougm}
549ec3fff108310966327d1dc9004551b63210b7dougm
549ec3fff108310966327d1dc9004551b63210b7dougm__slices () {
549ec3fff108310966327d1dc9004551b63210b7dougm local -a _slices
549ec3fff108310966327d1dc9004551b63210b7dougm _slices=(${(fo)"$(__get_slices)"})
549ec3fff108310966327d1dc9004551b63210b7dougm typeset -U _slices
549ec3fff108310966327d1dc9004551b63210b7dougm _describe 'slices' _slices
549ec3fff108310966327d1dc9004551b63210b7dougm}
549ec3fff108310966327d1dc9004551b63210b7dougm
549ec3fff108310966327d1dc9004551b63210b7dougm_arguments \
549ec3fff108310966327d1dc9004551b63210b7dougm {-h,--help}'[Show help message]' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--version[Show package version]' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--user[Run as user unit]' \
549ec3fff108310966327d1dc9004551b63210b7dougm {-H+,--host=}'[Operate on remote host]:[user@]host:_sd_hosts_or_user_at_host' \
549ec3fff108310966327d1dc9004551b63210b7dougm {-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--scope[Run this as scope rather than service]' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--unit=[Run under the specified unit name]:unit name' \
549ec3fff108310966327d1dc9004551b63210b7dougm {-p+,--property=}'[Set unit property]:NAME=VALUE:(( \
549ec3fff108310966327d1dc9004551b63210b7dougm CPUAccounting= MemoryAccounting= BlockIOAccounting= SendSIGHUP= \
549ec3fff108310966327d1dc9004551b63210b7dougm SendSIGKILL= MemoryLimit= CPUShares= BlockIOWeight= User= Group= \
549ec3fff108310966327d1dc9004551b63210b7dougm DevicePolicy= KillMode= DeviceAllow= BlockIOReadBandwidth= \
549ec3fff108310966327d1dc9004551b63210b7dougm BlockIOWriteBandwidth= BlockIODeviceWeight= Nice= Environment= \
549ec3fff108310966327d1dc9004551b63210b7dougm KillSignal= LimitCPU= LimitFSIZE= LimitDATA= LimitSTACK= \
549ec3fff108310966327d1dc9004551b63210b7dougm LimitCORE= LimitRSS= LimitNOFILE= LimitAS= LimitNPROC= \
549ec3fff108310966327d1dc9004551b63210b7dougm LimitMEMLOCK= LimitLOCKS= LimitSIGPENDING= LimitMSGQUEUE= \
549ec3fff108310966327d1dc9004551b63210b7dougm LimitNICE= LimitRTPRIO= LimitRTTIME= PrivateTmp= PrivateDevices= \
549ec3fff108310966327d1dc9004551b63210b7dougm PrivateNetwork= NoNewPrivileges= WorkingDirectory= RootDirectory= \
549ec3fff108310966327d1dc9004551b63210b7dougm TTYPath= SyslogIdentifier= SyslogLevelPrefix= SyslogLevel= \
549ec3fff108310966327d1dc9004551b63210b7dougm SyslogFacility= TimerSlackNSec= OOMScoreAdjust= ReadWriteDirectories= \
549ec3fff108310966327d1dc9004551b63210b7dougm ReadOnlyDirectories= InaccessibleDirectories= EnvironmentFile= \
549ec3fff108310966327d1dc9004551b63210b7dougm ))' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--description=[Description for unit]:description' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--slice=[Run in the specified slice]:slices:__slices' \
549ec3fff108310966327d1dc9004551b63210b7dougm {-r,--remain-after-exit}'[Leave service around until explicitly stopped]' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--send-sighup[Send SIGHUP when terminating]' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--service-type=[Service type]:type:(simple forking oneshot dbus notify idle)' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--uid=[Run as system user]:user:_users' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--gid=[Run as system group]:group:_groups' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--nice=[Nice level]:nice level' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--setenv=[Set environment]:NAME=VALUE' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--on-active=[Run after SEC seconds]:SEC' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--on-boot=[Run after SEC seconds from machine was booted up]:SEC' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--on-statup=[Run after SEC seconds from systemd was first started]:SEC' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--on-unit-active=[Run after SEC seconds from the last activation]:SEC' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--on-unit-inactive=[Run after SEC seconds from the last deactivation]:SEC' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--on-calendar=[Realtime timer]:SPEC' \
549ec3fff108310966327d1dc9004551b63210b7dougm '--timer-property=[Set timer unit property]:NAME=VALUE' \
549ec3fff108310966327d1dc9004551b63210b7dougm '*::command:_command'
549ec3fff108310966327d1dc9004551b63210b7dougm