mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix bash completion for plugin enable|disable
`docker plugin enable` and `docker plugin disable` only accept one plugin. Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
997777ae92
commit
390effdd11
1 changed files with 8 additions and 2 deletions
|
@ -3222,7 +3222,10 @@ _docker_plugin_disable() {
|
||||||
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
__docker_complete_plugins_installed
|
local counter=$(__docker_pos_first_nonflag)
|
||||||
|
if [ $cword -eq $counter ]; then
|
||||||
|
__docker_complete_plugins_installed
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -3239,7 +3242,10 @@ _docker_plugin_enable() {
|
||||||
COMPREPLY=( $( compgen -W "--help --timeout" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "--help --timeout" -- "$cur" ) )
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
__docker_complete_plugins_installed
|
local counter=$(__docker_pos_first_nonflag '--timeout')
|
||||||
|
if [ $cword -eq $counter ]; then
|
||||||
|
__docker_complete_plugins_installed
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue