Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix & improve bash completion for swarm mode commands #24119

Merged
merged 3 commits into from
Jul 8, 2016

Conversation

albers
Copy link
Member

@albers albers commented Jun 29, 2016

Ref: #23363, #23476

fixes

  • docker service {ls,tasks} --filter was treated as a boolean option
  • docker node demote would also complete files in the current directory

new completions

  • add completions for various filters in docker {service,node} {ls,tasks}
  • complete the default port after docker swarm init hostname: and --listen-addr hostname:

cleanup

There was duplicated logic in quite a bunch of helper funcions for service and node lookups.
This was refactored into two parameterized functions that now also deal with customization, see next item.

configurable completions

For images and networks we already have environment variables that configure whether or not IDs should be used in completions. Now, you can configure this for services and nodes as well.

Please schedule for 1.12.0

ping @jfrazelle @tianon for review
ping @sdurrheimer Hi, maybe you can use this in zsh completion

@cpuguy83 cpuguy83 added this to the 1.12.0 milestone Jun 29, 2016
@cpuguy83 cpuguy83 added the priority/P3 Best effort: those are nice to have / minor issues. label Jun 29, 2016
@thaJeztah
Copy link
Member

ping @mgoelzer @tianon PTAL

Signed-off-by: Harald Albers <github@albersweb.de>
Signed-off-by: Harald Albers <github@albersweb.de>
Signed-off-by: Harald Albers <github@albersweb.de>
@albers
Copy link
Member Author

albers commented Jul 3, 2016

Updated for the renamed filter desired_state => desired-state, see #24128

@icecrime
Copy link
Contributor

icecrime commented Jul 5, 2016

Woohoo, thank you! 👍 LGTM

@cpuguy83
Copy link
Member

cpuguy83 commented Jul 8, 2016

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/P3 Best effort: those are nice to have / minor issues. process/cherry-picked status/2-code-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants