mirror of https://github.com/docker/cli.git
bash completion for `docker ps -f {before,since}`
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
d1aaf129f2
commit
dd83546376
|
@ -1489,6 +1489,11 @@ _docker_ps() {
|
||||||
__docker_complete_images
|
__docker_complete_images
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
before)
|
||||||
|
cur="${cur##*=}"
|
||||||
|
__docker_complete_containers_all
|
||||||
|
return
|
||||||
|
;;
|
||||||
id)
|
id)
|
||||||
cur="${cur##*=}"
|
cur="${cur##*=}"
|
||||||
__docker_complete_container_ids
|
__docker_complete_container_ids
|
||||||
|
@ -1499,6 +1504,11 @@ _docker_ps() {
|
||||||
__docker_complete_container_names
|
__docker_complete_container_names
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
since)
|
||||||
|
cur="${cur##*=}"
|
||||||
|
__docker_complete_containers_all
|
||||||
|
return
|
||||||
|
;;
|
||||||
status)
|
status)
|
||||||
COMPREPLY=( $( compgen -W "created dead exited paused restarting running" -- "${cur##*=}" ) )
|
COMPREPLY=( $( compgen -W "created dead exited paused restarting running" -- "${cur##*=}" ) )
|
||||||
return
|
return
|
||||||
|
@ -1511,11 +1521,8 @@ _docker_ps() {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$prev" in
|
case "$prev" in
|
||||||
--before|--since)
|
|
||||||
__docker_complete_containers_all
|
|
||||||
;;
|
|
||||||
--filter|-f)
|
--filter|-f)
|
||||||
COMPREPLY=( $( compgen -S = -W "ancestor exited id label name status volume" -- "$cur" ) )
|
COMPREPLY=( $( compgen -S = -W "ancestor before exited id label name since status volume" -- "$cur" ) )
|
||||||
__docker_nospace
|
__docker_nospace
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
@ -1526,7 +1533,7 @@ _docker_ps() {
|
||||||
|
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
-*)
|
-*)
|
||||||
COMPREPLY=( $( compgen -W "--all -a --before --filter -f --format --help --latest -l -n --no-trunc --quiet -q --size -s --since" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "--all -a --filter -f --format --help --latest -l -n --no-trunc --quiet -q --size -s" -- "$cur" ) )
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue