summaryrefslogtreecommitdiffstats
path: root/misc/zsh-completion
diff options
context:
space:
mode:
Diffstat (limited to 'misc/zsh-completion')
-rw-r--r--misc/zsh-completion7
1 files changed, 6 insertions, 1 deletions
diff --git a/misc/zsh-completion b/misc/zsh-completion
index 446e269..bf23fac 100644
--- a/misc/zsh-completion
+++ b/misc/zsh-completion
@@ -22,7 +22,12 @@ __get_targets() {
then
eval dir="${opt_args[-C]}"
fi
- targets_command="ninja -C \"${dir}\" -t targets all"
+ file="build.ninja"
+ if [ -n "${opt_args[-f]}" ];
+ then
+ eval file="${opt_args[-f]}"
+ fi
+ targets_command="ninja -f \"${file}\" -C \"${dir}\" -t targets all"
eval ${targets_command} 2>/dev/null | cut -d: -f1
}