mirror of
https://github.com/containers/skopeo.git
synced 2025-07-10 13:13:56 +00:00
Merge pull request #596 from eramoto/fix-bash-completions
completions: Fix bash completions when a option requires a argument
This commit is contained in:
commit
8868d2ebe4
@ -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
|
||||
-*)
|
||||
|
Loading…
Reference in New Issue
Block a user