Move bash completion logic to new subcommand: logs
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: bd996a11a1
Component: cli
This commit is contained in:
committed by
Tibor Vass
parent
d0a00b93a7
commit
09cd45cad5
@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user