From: Ben Falconer Date: Fri, 30 Oct 2015 14:43:32 +0000 (+0000) Subject: Speed up zsh target completion X-Git-Tag: upstream/1.7.0^2~42^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=530d2b16662de786f10243b96f6e3596e90b357a;p=platform%2Fupstream%2Fninja.git Speed up zsh target completion --- 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() {