-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix and simplify bash completion for service env, mounts and labels #682
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #682 +/- ##
==========================================
+ Coverage 53.44% 53.45% +<.01%
==========================================
Files 218 218
Lines 14613 14613
==========================================
+ Hits 7810 7811 +1
+ Misses 6322 6321 -1
Partials 481 481 |
e32cee7 to
2ee36c8
Compare
`service create` and `service update` both used to have `--env`, `--label` and `--mount` options. These options now are only valid for `service create`. `service update` got corresponding `--xxx-add|rm` options instead. Signed-off-by: Harald Albers <github@albersweb.de>
Previously, the completions for `--xxx` and the corresponding `-xxx-add` and `-xxx-rm` options were defined in separate blocks. This caused a lot of duplicated code. This PR removes duplication for xxx=config|group|host|placement-pref|secret. Now the blocks for `create` and `update` only contain completions for options that either only exist for the particular command or are specific to it (completions for `--env-rm` and `--env|env-add` differ). Signed-off-by: Harald Albers <github@albersweb.de>
2ee36c8 to
f2b42bb
Compare
|
rebased because of a conflict with |
dnephin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
vdemeester
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🌮
Fix and simplify bash completion for service env, mounts and labels Upstream-commit: 26a2a45 Component: cli
service createandservice updateboth used to have--env,--labeland--mountoptions.These options now are only valid for
service create.service updategot corresponding--xxx-add|rmoptions instead.Also removes some duplication between the completions for
--xxxand the corresponding-xxx-addand-xxx-rmoptions.