From 298b9e23a6e21161a7fe486aab94944a58d5e90c Mon Sep 17 00:00:00 2001 From: William Giokas <1007380@gmail.com> Date: Wed, 14 Aug 2013 22:09:14 -0500 Subject: 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. --- shell-completion/zsh/_systemd-delta | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 shell-completion/zsh/_systemd-delta (limited to 'shell-completion/zsh/_systemd-delta') 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)' -- cgit v1.2.3-54-g00ecf