]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - shell-completion/zsh/_journalctl
zsh: correct journalctl command completion parsing
[thirdparty/systemd.git] / 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'
 }