mirror of
https://github.com/moby/moby.git
synced 2026-08-03 06:30:59 +00:00
Merge pull request #29805 from albers/completion-plugin-enable
Fix bash completion for `plugin enable|disable`
This commit is contained in:
@@ -3219,10 +3219,13 @@ _docker_plugin_create() {
|
||||
_docker_plugin_disable() {
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
|
||||
COMPREPLY=( $( compgen -W "--force -f --help" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
__docker_complete_plugins_installed
|
||||
local counter=$(__docker_pos_first_nonflag)
|
||||
if [ $cword -eq $counter ]; then
|
||||
__docker_complete_plugins_installed
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -3239,7 +3242,10 @@ _docker_plugin_enable() {
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user