1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-04 05:17:43 +03:00

zsh: correct journalctl command completion parsing

(cherry picked from commit 45b156c155)
(cherry picked from commit 42fab2d454)
(cherry picked from commit 2d0e391967)
This commit is contained in:
Ronan Pigott 2020-08-24 19:33:37 -07:00 committed by Zbigniew Jędrzejewski-Szmek
parent fec0bb6df4
commit 342dc4c15f

View File

@ -26,11 +26,11 @@ _journalctl_fields() {
_journalctl_none() {
local -a _commands _files _jrnl_none
# Setting use-cache will slow this down considerably
_commands=( ${"$(_call_program commands "$service $_sys_service_mgr -F _EXE" 2>/dev/null)"} )
_commands=( ${(f)"$(_call_program commands "$service $_sys_service_mgr -F _EXE" 2>/dev/null)"} )
_jrnl_none='yes'
_alternative : \
'files:/dev files:_files -W /dev -P /dev/' \
"commands:commands:($_commands[@])" \
'commands:commands:compadd -a _commands' \
'fields:fields:_journalctl_fields'
}