Merge pull request #246 from albers/completion-prune--filter-label

Add bash completion for `label` filter of `prune` commands
This commit is contained in:
Victor Vieux 2017-07-04 16:44:23 +02:00 committed by GitHub
commit 1f45f1b5f9
1 changed files with 13 additions and 5 deletions

View File

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