summaryrefslogtreecommitdiff
path: root/shell-completion/zsh/_systemd-delta
diff options
context:
space:
mode:
authorWilliam Giokas <1007380@gmail.com>2013-08-14 22:09:14 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-08-15 11:29:08 -0400
commit298b9e23a6e21161a7fe486aab94944a58d5e90c (patch)
treef6a92e5e86445f2c91241fc5fee02da93d3ceb3a /shell-completion/zsh/_systemd-delta
parent1acbb95c2b58373909d1e7a09a2eed0f6595cf6e (diff)
zsh_completion: Allow specifying multiple arguments
Some of the options in systemd can take multiple arguments, such as systemctl's --type option. Previously, you would only be able to complete a single type after the -t, but now zsh will continue to complete the types, separating them by commas. systemd-inhibit's --what command has colon (:), and that has been taken into account.
Diffstat (limited to 'shell-completion/zsh/_systemd-delta')
-rw-r--r--shell-completion/zsh/_systemd-delta15
1 files changed, 15 insertions, 0 deletions
diff --git a/shell-completion/zsh/_systemd-delta b/shell-completion/zsh/_systemd-delta
new file mode 100644
index 0000000000..6abb6fc217
--- /dev/null
+++ b/shell-completion/zsh/_systemd-delta
@@ -0,0 +1,15 @@
+#compdef systemd-delta
+
+_delta_type() {
+ local -a _delta_types
+ _delta_types=(masked equivalent redirected overridden unchanged)
+ _values -s , "${_delta_types[@]}"
+}
+
+_arguments \
+ {-h,--help}'[Show this help]' \
+ '--version[Show package version]' \
+ '--no-pager[Do not pipe output into a pager]' \
+ '--diff=[Show a diff when overridden files differ]:boolean:(1 0)' \
+ {-t,--type=}'[Only display a selected set of override types]:types:_delta_type' \
+ ':SUFFIX:(tmpfiles.d sysctl.d systemd/system)'