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