Skip to content

Commit

Permalink
Merge pull request moby#30181 from albers/completion--filter-until
Browse files Browse the repository at this point in the history
Add bash completion for `container|image|network prune --filter until`
  • Loading branch information
mlaventure authored Jan 16, 2017
2 parents e74623d + 2177864 commit a7c3389
Showing 1 changed file with 36 additions and 4 deletions.
40 changes: 36 additions & 4 deletions contrib/completion/bash/docker
Original file line number Diff line number Diff line change
Expand Up @@ -1234,9 +1234,17 @@ _docker_container_port() {
}

_docker_container_prune() {
case "$prev" in
--filter)
COMPREPLY=( $( compgen -W "until" -S = -- "$cur" ) )
__docker_nospace
return
;;
esac

case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--force -f --help" -- "$cur" ) )
COMPREPLY=( $( compgen -W "--force -f --filter --help" -- "$cur" ) )
;;
esac
}
Expand Down Expand Up @@ -2170,9 +2178,17 @@ _docker_image_ls() {
}

_docker_image_prune() {
case "$prev" in
--filter)
COMPREPLY=( $( compgen -W "until" -S = -- "$cur" ) )
__docker_nospace
return
;;
esac

case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--all -a --force -f --help" -- "$cur" ) )
COMPREPLY=( $( compgen -W "--all -a --force -f --filter --help" -- "$cur" ) )
;;
esac
}
Expand Down Expand Up @@ -2532,9 +2548,17 @@ _docker_network_ls() {
}

_docker_network_prune() {
case "$prev" in
--filter)
COMPREPLY=( $( compgen -W "until" -S = -- "$cur" ) )
__docker_nospace
return
;;
esac

case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--force -f --help" -- "$cur" ) )
COMPREPLY=( $( compgen -W "--force -f --filter --help" -- "$cur" ) )
;;
esac
}
Expand Down Expand Up @@ -3811,9 +3835,17 @@ _docker_system_info() {
}

_docker_system_prune() {
case "$prev" in
--filter)
COMPREPLY=( $( compgen -W "until" -S = -- "$cur" ) )
__docker_nospace
return
;;
esac

case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--all -a --force -f --help" -- "$cur" ) )
COMPREPLY=( $( compgen -W "--all -a --force -f --filter --help" -- "$cur" ) )
;;
esac
}
Expand Down

0 comments on commit a7c3389

Please sign in to comment.