Add bash completion for kubernetes orchestrator#1254
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1254 +/- ##
=======================================
Coverage 54.27% 54.27%
=======================================
Files 268 268
Lines 17848 17848
=======================================
Hits 9687 9687
Misses 7551 7551
Partials 610 610 |
| __docker_complete_stack_orchestrator_options && return | ||
|
|
||
| case "$prev" in | ||
| --bundle-file) |
There was a problem hiding this comment.
I removed the selective completion here although it is correct behavior.
The important part is that --bundle-file is not completed if it is not appropriate, which is already taken care for.
If someone insists on manually typing this option, he will now get it completed although it does not exist in this context.
This is an error, but given the growing complexity of hiding options based on operating system, client/server experimental state and orchestrator replicating the hiding logic in the individual option's completions will bloat the code without much value.
silvin-lubecki
left a comment
There was a problem hiding this comment.
SGTM, thank you @albers !
Signed-off-by: Harald Albers <github@albersweb.de>
Signed-off-by: Harald Albers <github@albersweb.de>
Signed-off-by: Harald Albers <github@albersweb.de>
83af9a0 to
08f8ee1
Compare
|
rebased in order to pull in #1251. |
Depends on #1251 edit: #1251 was merged.
This
The configured orchestrator is determined from the output of
docker stack deploy|ls --help.As the required help output is broken in 18.06.0 (see #1243) this work depends on #1251.To test before #1251 is merged, just use a binary built at #1251.I recommend using
export DOCKER_STACK_ORCHESTRATOR=kubernetes|swarm|all, then invoking the completions ofdocker stack (deploy|ls|ps|rm|services)? --anddocker version --.Thanks @silvin-lubecki for fixing the help output so fast.