Fix bash completion for `plugin enable|disable`
`docker plugin enable` and `docker plugin disable` only
accept one plugin.
@@ -3222,7 +3222,10 @@ _docker_plugin_disable() {
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
;;
*)
+ 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" ) )
;;
*)
+ local counter=$(__docker_pos_first_nonflag '--timeout')
+ if [ $cword -eq $counter ]; then
__docker_complete_plugins_installed
+ fi
;;
esac
}
