summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Falconer <ben@falconers.me.uk>2015-10-30 14:43:32 +0000
committerBen Falconer <ben@falconers.me.uk>2015-10-30 14:43:32 +0000
commit530d2b16662de786f10243b96f6e3596e90b357a (patch)
tree48f781d0a163270ba070d2eba101230a0e1f2123
parent083b6b040681ec3d8ec3cd40f20406b9e6ec8d56 (diff)
downloadninja-530d2b16662de786f10243b96f6e3596e90b357a.tar.gz
Speed up zsh target completion
-rw-r--r--misc/zsh-completion3
1 files changed, 1 insertions, 2 deletions
diff --git a/misc/zsh-completion b/misc/zsh-completion
index fd9b3a7..ad7b87f 100644
--- a/misc/zsh-completion
+++ b/misc/zsh-completion
@@ -23,8 +23,7 @@ __get_targets() {
eval dir="${opt_args[-C]}"
fi
targets_command="ninja -C \"${dir}\" -t targets"
- eval ${targets_command} 2>/dev/null | while read -r a b; do echo $a | cut -d ':' -f1; done;
-
+ eval ${targets_command} 2>/dev/null | sed "s/^\(.*\): .*$/\1/"
}
__get_tools() {