]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
zsh: add systemd-path completions
authorRonan Pigott <rpigott@berkeley.edu>
Wed, 23 Sep 2020 00:52:53 +0000 (17:52 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 23 Sep 2020 08:07:14 +0000 (10:07 +0200)
shell-completion/zsh/_systemd-path [new file with mode: 0644]
shell-completion/zsh/meson.build

diff --git a/shell-completion/zsh/_systemd-path b/shell-completion/zsh/_systemd-path
new file mode 100644 (file)
index 0000000..dd2e720
--- /dev/null
@@ -0,0 +1,8 @@
+#compdef systemd-path
+
+typeset -A sdpath=( ${$(systemd-path)/:/} )
+_arguments -S \
+       '(-h --help)'{-h,--help}'[Print help text and exit]' \
+       '(-v --version)'{-v,--version}'[Print a version string and exit]' \
+       '--suffix=[Append a suffix to the paths]' \
+       '*:pathname:compadd -k sdpath'
index 6df9cc6ac2beeabf40a10ed0cf0427f058b90680..ff91cc1134cbd95f87501861285f8435ff93829a 100644 (file)
@@ -17,6 +17,7 @@ if zshcompletiondir != 'no'
                  ['_systemd-delta',            ''],
                  ['_systemd-nspawn',           ''],
                  ['_systemd',                  ''],
+                 ['_systemd-path',             ''],
                  ['_systemd-run',              ''],
                  ['_udevadm',                  ''],
                  ['_kernel-install',           ''],