Merge pull request #30941 from sdurrheimer/zsh-completion-service-logs

Add zsh completion for 'docker service logs' command
(cherry picked from commit 03db46362e)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Brian Goff 2017-02-14 15:59:19 -05:00 committed by Sebastiaan van Stijn
parent d4897c746f
commit aaff3d513e
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -1762,6 +1762,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"
@ -1839,6 +1840,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 \