]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
zsh: correct journalctl command completion parsing
authorRonan Pigott <rpigott@berkeley.edu>
Tue, 25 Aug 2020 02:33:37 +0000 (19:33 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 25 Aug 2020 07:29:13 +0000 (09:29 +0200)
shell-completion/zsh/_journalctl

index 43bec9b1d62cebd976c1ef774e883b40de5dd7af..ecc5d0831abd4a599950db51eeada8450c595507 100644 (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'
 }