Move bash completion logic to new subcommand: logs

Signed-off-by: Harald Albers <github@albersweb.de>
master
Harald Albers 2016-10-19 18:52:50 +02:00 committed by Tibor Vass
parent 13fde2b8c5
commit bd996a11a1
1 changed files with 18 additions and 18 deletions

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() {