summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Braun-Jones <taylor.braun-jones@ge.com>2014-04-27 22:31:40 (GMT)
committerTaylor Braun-Jones <taylor.braun-jones@ge.com>2014-04-30 18:39:04 (GMT)
commitb1d4668260ef142837c76c6ca95c32e1a43d4aef (patch)
tree5131e685fd803571a17da316bd1237066abad563
parent4f9ac2aab919f3ce522afe7cc1b65c24897b2306 (diff)
downloadNinja-b1d4668260ef142837c76c6ca95c32e1a43d4aef.zip
Ninja-b1d4668260ef142837c76c6ca95c32e1a43d4aef.tar.gz
Ninja-b1d4668260ef142837c76c6ca95c32e1a43d4aef.tar.bz2
Fix getopts barfing over the terminal when trying to complete -f and -C
Note that this is only applicable for when bash_completion is unavailable.
-rw-r--r--misc/bash-completion2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/bash-completion b/misc/bash-completion
index b30b773..6edf4df 100644
--- a/misc/bash-completion
+++ b/misc/bash-completion
@@ -43,7 +43,7 @@ _ninja_target() {
dir="."
line=$(echo ${COMP_LINE} | cut -d" " -f 2-)
# filter out all non relevant arguments but keep C for dirs
- while getopts C:f:j:l:k:nvd:t: opt $line; do
+ while getopts :C:f:j:l:k:nvd:t: opt $line; do
case $opt in
# eval for tilde expansion
C) eval dir="$OPTARG" ;;