Add bash completion for `label` filter of `prune` commands

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2017-06-27 11:28:52 +02:00
parent 2eac0bb7b7
commit 8b99b65ca8
1 changed files with 13 additions and 5 deletions

View File

@ -1413,7 +1413,7 @@ _docker_container_port() {
_docker_container_prune() { _docker_container_prune() {
case "$prev" in case "$prev" in
--filter) --filter)
COMPREPLY=( $( compgen -W "until" -S = -- "$cur" ) ) COMPREPLY=( $( compgen -W "label label! until" -S = -- "$cur" ) )
__docker_nospace __docker_nospace
return return
;; ;;
@ -2428,7 +2428,7 @@ _docker_image_ls() {
_docker_image_prune() { _docker_image_prune() {
case "$prev" in case "$prev" in
--filter) --filter)
COMPREPLY=( $( compgen -W "until" -S = -- "$cur" ) ) COMPREPLY=( $( compgen -W "label label! until" -S = -- "$cur" ) )
__docker_nospace __docker_nospace
return return
;; ;;
@ -2806,7 +2806,7 @@ _docker_network_ls() {
_docker_network_prune() { _docker_network_prune() {
case "$prev" in case "$prev" in
--filter) --filter)
COMPREPLY=( $( compgen -W "until" -S = -- "$cur" ) ) COMPREPLY=( $( compgen -W "label label! until" -S = -- "$cur" ) )
__docker_nospace __docker_nospace
return return
;; ;;
@ -4314,7 +4314,7 @@ _docker_system_info() {
_docker_system_prune() { _docker_system_prune() {
case "$prev" in case "$prev" in
--filter) --filter)
COMPREPLY=( $( compgen -W "until" -S = -- "$cur" ) ) COMPREPLY=( $( compgen -W "label label! until" -S = -- "$cur" ) )
__docker_nospace __docker_nospace
return return
;; ;;
@ -4433,9 +4433,17 @@ _docker_volume_ls() {
} }
_docker_volume_prune() { _docker_volume_prune() {
case "$prev" in
--filter)
COMPREPLY=( $( compgen -W "label label!" -S = -- "$cur" ) )
__docker_nospace
return
;;
esac
case "$cur" in case "$cur" in
-*) -*)
COMPREPLY=( $( compgen -W "--force -f --help" -- "$cur" ) ) COMPREPLY=( $( compgen -W "--filter --force -f --help" -- "$cur" ) )
;; ;;
esac esac
} }