diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-08-11 15:39:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-11 15:39:15 -0400 |
commit | 9c5077fed42dc3cd2517a7ab816babef549dd079 (patch) | |
tree | a319742b90345be50d7b770cfc31777e41b96163 /shell-completion/zsh/_journalctl | |
parent | 29df65f913ec7d360637ef1703ec284bb1fa6821 (diff) | |
parent | 21d84318c3a2dc54732513a80c983f560948c4d8 (diff) |
Merge pull request #3942 from blueyed/zsh-respect-user-more
zsh completion: handle --user mode when filtering by state and in journalctl commands
Diffstat (limited to 'shell-completion/zsh/_journalctl')
-rw-r--r-- | shell-completion/zsh/_journalctl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl index 2bee23b6d3..2271f7fa9c 100644 --- a/shell-completion/zsh/_journalctl +++ b/shell-completion/zsh/_journalctl @@ -23,7 +23,7 @@ _list_fields() { _journal_none() { local -a _commands _files _jrnl_none # Setting use-cache will slow this down considerably - _commands=( ${"$(_call_program commands "$service" -F _EXE 2>/dev/null)"} ) + _commands=( ${"$(_call_program commands "$service $_sys_service_mgr -F _EXE" 2>/dev/null)"} ) _jrnl_none='yes' _alternative : \ 'files:/dev files:_files -W /dev -P /dev/' \ @@ -51,6 +51,8 @@ _journal_boots() { "bootid:boot ids:compadd -a _bootid" } +local -a _modes; _modes=("--user" "--system") +local _sys_service_mgr=${${words:*_modes}[(R)(${(j.|.)_modes})]:---system} _arguments -s \ {-h,--help}'[Show this help]' \ '--version[Show package version]' \ |