summaryrefslogtreecommitdiffstats
path: root/shell-completion/zsh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:18:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:18:14 +0000
commit67c5de60daa85b91fa68be4157e248fa31e75316 (patch)
tree7d567f3360f705ac21600343ef7f7cea645a9222 /shell-completion/zsh
parentAdding upstream version 256.1. (diff)
downloadsystemd-67c5de60daa85b91fa68be4157e248fa31e75316.tar.xz
systemd-67c5de60daa85b91fa68be4157e248fa31e75316.zip
Adding upstream version 256.2.upstream/256.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'shell-completion/zsh')
-rw-r--r--shell-completion/zsh/_run057
-rw-r--r--shell-completion/zsh/meson.build1
2 files changed, 58 insertions, 0 deletions
diff --git a/shell-completion/zsh/_run0 b/shell-completion/zsh/_run0
new file mode 100644
index 0000000..b354462
--- /dev/null
+++ b/shell-completion/zsh/_run0
@@ -0,0 +1,57 @@
+#compdef run0
+
+(( $+functions[_run0_unit_properties] )) ||
+_run0_unit_properties() {
+ local -a props=(
+ BlockIOAccounting BlockIODeviceWeight BlockIOReadBandwidth
+ BlockIOWeight BlockIOWriteBandwidth CPUAccounting
+ CPUShares DeviceAllow DevicePolicy
+ Environment EnvironmentFile ExitType
+ FinalKillSignal Group InaccessiblePaths
+ KillMode KillSignal LimitAS
+ LimitCORE LimitCPU LimitDATA
+ LimitFSIZE LimitLOCKS LimitMEMLOCK
+ LimitMSGQUEUE LimitNICE LimitNOFILE
+ LimitNPROC LimitRSS LimitRTPRIO
+ LimitRTTIME LimitSIGPENDING LimitSTACK
+ MemoryAccounting MemoryLimit Nice
+ NoNewPrivileges OOMScoreAdjust PassEnvironment
+ PrivateDevices PrivateNetwork PrivateTmp
+ ProtectHome ProtectSystem ReadOnlyPaths
+ ReadWritePaths RestartKillSignal RootDirectory
+ RuntimeDirectory SendSIGHUP SendSIGKILL
+ SyslogFacility SyslogIdentifier SyslogLevel
+ SyslogLevelPrefix TTYPath TimerSlackNSec
+ User WorkingDirectory
+ )
+ _values -S= 'properties' ${^props}'::()'
+}
+
+(( $+functions[_run0_slices] )) ||
+_run0_slices() {
+ local -a slices=(
+ ${(@f)"$(_call_program slice-units systemctl --no-pager --legend=no --plain list-units --all -t slice 2>/dev/null)"}
+ )
+ slices=( ${slices%% *} )
+ _describe -t slice-units 'slice unit' slices
+}
+
+local -a args=(
+ '--no-ask-password[Do not query the user for authentication]'
+ '--unit=[Use this unit name instead of an automatically generated one]'
+ {--property=,-p+}'[Sets a property on the service unit created]:property:_run0_unit_properties'
+ '--description=[Provide a description for the service unit]'
+ '--slice=[Make the new .service unit part of the specified slice]:slice unit:_run0_slices'
+ '--slice-inherit[Make the new service unit part of the current slice]'
+ {--user=,-u+}'[Switch to the specified user]:user:_users'
+ {--group=,-g+}'[Switch to the specified group]:group:_groups'
+ '--nice=[Run with specified nice level]:nice value'
+ {--chdir=,-D+}'[Run within the specified working directory]:directory:_files -/'
+ '--setenv=[Set the specified environment variable in the session]:environment variable:_parameters -g "*export*" -S = -q'
+ '--background=[Change the terminal background color to the specified ANSI color]:ansi color'
+ '--machine=[Execute the operation on a local container]:machine:_sd_machines'
+ {-h,--help}'[Show the help text and exit]'
+ '--version[Print a short version string and exit]'
+)
+
+_arguments -S $args '*:: :{_normal -p $service}'
diff --git a/shell-completion/zsh/meson.build b/shell-completion/zsh/meson.build
index ebe79f3..acbf34e 100644
--- a/shell-completion/zsh/meson.build
+++ b/shell-completion/zsh/meson.build
@@ -21,6 +21,7 @@ items = [['_busctl', ''],
['_systemd', ''],
['_systemd-path', ''],
['_systemd-run', ''],
+ ['_run0', ''],
['_udevadm', ''],
['_kernel-install', 'ENABLE_KERNEL_INSTALL'],
['_sd_hosts_or_user_at_host', ''],