zsh_completion: Speed up noncached perf of _journalctl

Splitting things unnecessarily at newlines causes tab completion to take
an extremely long time. Also add a note saying that caching is not good
for journalctl's completion.
This commit is contained in:
William Giokas 2013-08-01 21:35:16 -05:00 committed by Zbigniew Jędrzejewski-Szmek
parent 1272ff850a
commit 4af6e458e5
1 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,8 @@ _list_fields() {
_journal_none() {
local -a _commands _files
_commands=( ${(f)"$(_call_program commands "$service" -F _EXE 2>/dev/null)"} )
# Setting use-cache will slow this down considerably
_commands=( ${"$(_call_program commands "$service" -F _EXE 2>/dev/null)"} )
_alternative : \
'files:/dev files:_files -W /dev -P /dev/' \
"commands:commands:($_commands[@])" \