summaryrefslogtreecommitdiffstats
path: root/shell-completion/zsh/_systemd-path
diff options
context:
space:
mode:
authorRonan Pigott <rpigott@berkeley.edu>2020-09-23 02:52:53 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-09-23 10:07:14 +0200
commitcf18af825aa4a55debcf2ed88a5b930dfbc0d23f (patch)
treec4fd0b07e453cbd8f9b75fa39d8f23382492675a /shell-completion/zsh/_systemd-path
parentMerge pull request #17124 from bluca/copypasta (diff)
downloadsystemd-cf18af825aa4a55debcf2ed88a5b930dfbc0d23f.tar.xz
systemd-cf18af825aa4a55debcf2ed88a5b930dfbc0d23f.zip
zsh: add systemd-path completions
Diffstat (limited to 'shell-completion/zsh/_systemd-path')
-rw-r--r--shell-completion/zsh/_systemd-path8
1 files changed, 8 insertions, 0 deletions
diff --git a/shell-completion/zsh/_systemd-path b/shell-completion/zsh/_systemd-path
new file mode 100644
index 0000000000..dd2e720fd9
--- /dev/null
+++ b/shell-completion/zsh/_systemd-path
@@ -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'