1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Move bash completion logic to new subcommand: logs

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2016-10-19 18:52:50 +02:00
parent f1e12a4951
commit 4dedad3118

View file

@ -1128,7 +1128,23 @@ _docker_container_kill() {
}
_docker_container_logs() {
_docker_logs
case "$prev" in
--since|--tail)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--details --follow -f --help --since --tail --timestamps -t" -- "$cur" ) )
;;
*)
local counter=$(__docker_pos_first_nonflag '--since|--tail')
if [ $cword -eq $counter ]; then
__docker_complete_containers_all
fi
;;
esac
}
_docker_container_list() {
@ -1648,23 +1664,7 @@ _docker_logout() {
}
_docker_logs() {
case "$prev" in
--since|--tail)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--details --follow -f --help --since --tail --timestamps -t" -- "$cur" ) )
;;
*)
local counter=$(__docker_pos_first_nonflag '--since|--tail')
if [ $cword -eq $counter ]; then
__docker_complete_containers_all
fi
;;
esac
_docker_container_logs
}
_docker_network_connect() {