Move zsh completion logic to new subcommand: logs

Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
This commit is contained in:
Steve Durrheimer 2016-10-30 16:46:59 +01:00 committed by Tibor Vass
parent ca352f2941
commit a01c52a1a6
1 changed files with 9 additions and 9 deletions

View File

@ -689,7 +689,14 @@ __docker_container_subcommand() {
"($help -)*:containers:__docker_complete_running_containers" && ret=0 "($help -)*:containers:__docker_complete_running_containers" && ret=0
;; ;;
(logs) (logs)
__docker_subcommand && ret=0 _arguments $(__docker_arguments) \
$opts_help \
"($help)--details[Show extra details provided to logs]" \
"($help -f --follow)"{-f,--follow}"[Follow log output]" \
"($help -s --since)"{-s=,--since=}"[Show logs since this timestamp]:timestamp: " \
"($help -t --timestamps)"{-t,--timestamps}"[Show timestamps]" \
"($help)--tail=[Output the last K lines]:lines:(1 10 20 50 all)" \
"($help -)*:containers:__docker_complete_containers" && ret=0
;; ;;
(ls|list) (ls|list)
words[1]="ps" words[1]="ps"
@ -2023,14 +2030,7 @@ __docker_subcommand() {
"($help -)1:server: " && ret=0 "($help -)1:server: " && ret=0
;; ;;
(logs) (logs)
_arguments $(__docker_arguments) \ __docker_container_subcommand && ret=0
$opts_help \
"($help)--details[Show extra details provided to logs]" \
"($help -f --follow)"{-f,--follow}"[Follow log output]" \
"($help -s --since)"{-s=,--since=}"[Show logs since this timestamp]:timestamp: " \
"($help -t --timestamps)"{-t,--timestamps}"[Show timestamps]" \
"($help)--tail=[Output the last K lines]:lines:(1 10 20 50 all)" \
"($help -)*:containers:__docker_complete_containers" && ret=0
;; ;;
(network) (network)
local curcontext="$curcontext" state local curcontext="$curcontext" state