Skip to content

Commit

Permalink
Merge pull request moby#30941 from sdurrheimer/zsh-completion-service…
Browse files Browse the repository at this point in the history
…-logs

Add zsh completion for 'docker service logs' command
  • Loading branch information
cpuguy83 authored Feb 14, 2017
2 parents 4f6e4bf + a89a104 commit 03db463
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions contrib/completion/zsh/_docker
Original file line number Diff line number Diff line change
Expand Up @@ -1859,6 +1859,7 @@ __docker_service_commands() {
_docker_service_subcommands=(
"create:Create a new service"
"inspect:Display detailed information on one or more services"
"logs:Fetch the logs of a service"
"ls:List services"
"rm:Remove one or more services"
"scale:Scale one or multiple replicated services"
Expand Down Expand Up @@ -1937,6 +1938,17 @@ __docker_service_subcommand() {
"($help)--pretty[Print the information in a human friendly format]" \
"($help -)*:service:__docker_complete_services" && 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)--no-resolve[Do not map IDs to Names]" \
"($help)--since=[Show logs since timestamp]:timestamp: " \
"($help)--tail=[Number of lines to show from the end of the logs]:lines:(1 10 20 50 all)" \
"($help -t --timestamps)"{-t,--timestamps}"[Show timestamps]" \
"($help -)1:service:__docker_complete_services" && ret=0
;;
(ls|list)
_arguments $(__docker_arguments) \
$opts_help \
Expand Down

0 comments on commit 03db463

Please sign in to comment.