summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Giokas <1007380@gmail.com>2013-08-01 21:35:16 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-08-02 10:44:24 -0400
commit4af6e458e5a683b89032d560eb353c2272d3d564 (patch)
tree0654dabedee3af838287aae419899ee9e37466a9
parent1272ff850ac65557f3cc06e00d5ddbd2588ff8b0 (diff)
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.
-rw-r--r--shell-completion/zsh/_journalctl3
1 files changed, 2 insertions, 1 deletions
diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 4409fd7d68..61983d5b6d 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -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[@])" \