Merge pull request #30640 from albers/completion-plugin-ls--filter

Add bash completion for `docker plugin ls --filter`
This commit is contained in:
Kenfe-Mickaël Laventure 2017-02-07 13:32:29 -08:00 committed by GitHub
commit a19ead01be

View file

@ -3555,7 +3555,24 @@ _docker_plugin_list() {
}
_docker_plugin_ls() {
local key=$(__docker_map_key_of_current_option '--filter|-f')
case "$key" in
capability)
COMPREPLY=( $( compgen -W "authz ipamdriver networkdriver volumedriver" -- "${cur##*=}" ) )
return
;;
enabled)
COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) )
return
;;
esac
case "$prev" in
--filter|-f)
COMPREPLY=( $( compgen -S = -W "capability enabled" -- "$cur" ) )
__docker_nospace
return
;;
--format)
return
;;
@ -3563,7 +3580,7 @@ _docker_plugin_ls() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--format --help --no-trunc --quiet -q" -- "$cur" ) )
COMPREPLY=( $( compgen -W "--filter -f --format --help --no-trunc --quiet -q" -- "$cur" ) )
;;
esac
}