diff options
author | Nicolas Despres <nicolas.despres@gmail.com> | 2015-12-24 15:47:33 (GMT) |
---|---|---|
committer | Nicolas Despres <nicolas.despres@gmail.com> | 2015-12-24 15:53:05 (GMT) |
commit | 48e647781da3986ffbd3b6974ef9f3ac23d4047c (patch) | |
tree | 5d3f3969fe95110e992131dabc5548641664f84b | |
parent | 9a4eb587f3d3dcc6e6edd8d344a93b1c32d27dc7 (diff) | |
download | Ninja-48e647781da3986ffbd3b6974ef9f3ac23d4047c.zip Ninja-48e647781da3986ffbd3b6974ef9f3ac23d4047c.tar.gz Ninja-48e647781da3986ffbd3b6974ef9f3ac23d4047c.tar.bz2 |
Teach zsh to complete intermediary targets.
Bash completion script uses "-t targets all" to list the target which
is faster than "-t targets" and reports intermediary targets
(see the manual entry for the 'targets' tool).
See commit fc135c45.
-rw-r--r-- | misc/zsh-completion | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/misc/zsh-completion b/misc/zsh-completion index ad7b87f..446e269 100644 --- a/misc/zsh-completion +++ b/misc/zsh-completion @@ -22,8 +22,8 @@ __get_targets() { then eval dir="${opt_args[-C]}" fi - targets_command="ninja -C \"${dir}\" -t targets" - eval ${targets_command} 2>/dev/null | sed "s/^\(.*\): .*$/\1/" + targets_command="ninja -C \"${dir}\" -t targets all" + eval ${targets_command} 2>/dev/null | cut -d: -f1 } __get_tools() { @@ -65,4 +65,3 @@ _arguments \ '-d+[Enable debugging (use -d list to list modes)]:modes:__modes' \ '-t+[Run a subtool (use -t list to list subtools)]:tools:__tools' \ '*::targets:__targets' - |