Move zsh completion logic to new subcommand: logs
@@ -689,7 +689,14 @@ __docker_container_subcommand() {
"($help -)*:containers:__docker_complete_running_containers" && ret=0
;;
(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)
words[1]="ps"
@@ -2023,14 +2030,7 @@ __docker_subcommand() {
"($help -)1:server: " && ret=0
;;
(logs)
- _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
+ __docker_container_subcommand && ret=0
;;
(network)
local curcontext="$curcontext" state
