From b1d4668260ef142837c76c6ca95c32e1a43d4aef Mon Sep 17 00:00:00 2001 From: Taylor Braun-Jones Date: Sun, 27 Apr 2014 18:31:40 -0400 Subject: 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. --- misc/bash-completion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" ;; -- cgit v0.12