summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-11-11 21:46:19 -0800
committerNico Weber <nicolasweber@gmx.de>2015-11-11 21:46:19 -0800
commitdda86b75405a0eba1622af20da907daf96381698 (patch)
tree4c51e5ffa2fda96077c0b874ebbfe50a6666dd55
parent4ffe56d387dce2bc5126fc4079ad2f2b31fba30e (diff)
parent530d2b16662de786f10243b96f6e3596e90b357a (diff)
downloadninja-dda86b75405a0eba1622af20da907daf96381698.tar.gz
Merge pull request #1046 from zed0/master
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() {