Merge pull request #596 from eramoto/fix-bash-completions

completions: Fix bash completions when a option requires a argument
This commit is contained in:
Daniel J Walsh 2019-02-01 13:28:14 -05:00 committed by GitHub
commit 8868d2ebe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,11 +6,14 @@ _complete_() {
local options_with_args=$1
local boolean_options="$2 -h --help"
case "$prev" in
$options_with_args)
return
;;
esac
local option_with_args
for option_with_args in $options_with_args
do
if [ "$option_with_args" == "$prev" ]
then
return
fi
done
case "$cur" in
-*)