Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 48e6477

Browse files
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 fc135c4.
1 parent 9a4eb58 commit 48e6477

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

misc/zsh-completion

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ __get_targets() {
2222
then
2323
eval dir="${opt_args[-C]}"
2424
fi
25-
targets_command="ninja -C \"${dir}\" -t targets"
26-
eval ${targets_command} 2>/dev/null | sed "s/^\(.*\): .*$/\1/"
25+
targets_command="ninja -C \"${dir}\" -t targets all"
26+
eval ${targets_command} 2>/dev/null | cut -d: -f1
2727
}
2828

2929
__get_tools() {
@@ -65,4 +65,3 @@ _arguments \
6565
'-d+[Enable debugging (use -d list to list modes)]:modes:__modes' \
6666
'-t+[Run a subtool (use -t list to list subtools)]:tools:__tools' \
6767
'*::targets:__targets'
68-

0 commit comments

Comments
 (0)