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.
This commit is contained in:
Taylor Braun-Jones 2014-04-27 18:31:40 -04:00
parent 4f9ac2aab9
commit b1d4668260

View File

@ -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" ;;