summaryrefslogtreecommitdiff
path: root/shell-completion/systemd-zsh-completion.zsh
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-05 07:45:30 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-05 11:44:01 -0400
commit9e542e0b3a5069f340072c93b5d2283848a42a2e (patch)
tree7f60a5334e976ff1c7972d031e535f1d1508aa28 /shell-completion/systemd-zsh-completion.zsh
parentac2b34e155da16cde2cb9a0b25d8c3bf9dcaa018 (diff)
shell-completion: work on session shell is --user is used
https://bugs.freedesktop.org/show_bug.cgi?id=61695
Diffstat (limited to 'shell-completion/systemd-zsh-completion.zsh')
-rw-r--r--shell-completion/systemd-zsh-completion.zsh6
1 files changed, 4 insertions, 2 deletions
diff --git a/shell-completion/systemd-zsh-completion.zsh b/shell-completion/systemd-zsh-completion.zsh
index a8f7081459..46a6a1900c 100644
--- a/shell-completion/systemd-zsh-completion.zsh
+++ b/shell-completion/systemd-zsh-completion.zsh
@@ -404,7 +404,9 @@ _outputmodes() {
__systemctl()
{
- systemctl --full --no-legend --no-pager "$@"
+ local -a _modes
+ _modes=("--user" "--system")
+ systemctl ${words:*_modes} --full --no-legend --no-pager "$@"
}
@@ -556,7 +558,7 @@ done
(( $+functions[_systemctl_delete] )) || _systemctl_delete()
{
compadd "$@" - $(__systemctl list-units --type snapshot --all \
- | cut -d' ' -f1 2>/dev/null ) || _message "no snampshot found"
+ | cut -d' ' -f1 2>/dev/null ) || _message "no snapshot found"
}
# Completion functions for ENVS