summaryrefslogtreecommitdiff
path: root/shell-completion/zsh/_systemctl.in
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-06-02 17:43:29 +0200
committerDaniel Mack <github@zonque.org>2015-06-02 17:43:29 +0200
commitad2274289b36961c6c397f9d22dff55185b13c18 (patch)
treeaa6aec15a00813fd5766ca133d66577c7f2eb38f /shell-completion/zsh/_systemctl.in
parentea3db0141889301964c6214e1d2423d32d570946 (diff)
parent68c4f6d406a2bdac6957a67a077f182b0287cc3b (diff)
Merge pull request #4 from systemd-mailing-devs/1431989131-25145-1-git-send-email-llua@gmx.com
zsh-completion: fix completion of --user services
Diffstat (limited to 'shell-completion/zsh/_systemctl.in')
-rw-r--r--shell-completion/zsh/_systemctl.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index 1dc6406beb..db9bdb60c5 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -93,9 +93,7 @@
__systemctl()
{
- local -a _modes
- _modes=("--user" "--system")
- systemctl ${words:*_modes} --full --no-legend --no-pager "$@"
+ systemctl $_sys_service_mgr --full --no-legend --no-pager "$@"
}
@@ -355,6 +353,8 @@ _job_modes() {
_values -s , "${_modes[@]}"
}
+local -a _modes; _modes=("--user" "--system")
+local _sys_service_mgr=${${words:*_modes}[(R)(${(j.|.)_modes})]:---system}
_arguments -s \
{-h,--help}'[Show help]' \
'--version[Show package version]' \