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>
(cherry picked from commit 390effdd11)
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
Harald Albers 2016-12-31 09:23:27 -08:00 committed by Vincent Demeester
parent 428ae70759
commit 5903ead08e

View file

@ -3226,7 +3226,10 @@ _docker_plugin_disable() {
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
}
@ -3243,7 +3246,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
}