[systemd-devel] [PATCH 17/18] shell-comp: Speed up noncached perf of _journalctl
William Giokas
1007380 at gmail.com
Thu Aug 1 19:35:16 PDT 2013
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.
---
shell-completion/zsh/_journalctl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 4409fd7..61983d5 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[@])" \
--
1.8.4.rc0.352.g531e8cb
More information about the systemd-devel
mailing list