-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add bash completion for available plugins #4094
Conversation
13d2933
to
5c3a594
Compare
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.
Not a shell script expert here, but the logic looks good 👍
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.
This is really, really cool.
I have to admit that I do not fully understand __docker_complete_plugin()
but I assume this is basically an idiom for cobra generated completions and should be correct.
I did not find any issues with the completions.
Thanks @crazy-max.
5c3a594
to
9db59b8
Compare
@albers Thanks for the review. I made the suggested changed. I think in follow-up we could use the same logic but for all docker commands so we would only need a single function to handle completion like the I also have a branch to handle this for e.g., for fish:
Not tested and needs more work I think. I'm not an expert of this shell 😅. |
9db59b8
to
90cf663
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4094 +/- ##
==========================================
- Coverage 59.15% 59.13% -0.02%
==========================================
Files 285 285
Lines 24725 24738 +13
==========================================
+ Hits 14627 14630 +3
- Misses 9212 9221 +9
- Partials 886 887 +1 |
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.
Thanks @crazy-max. Very impressive.
Signed-off-by: CrazyMax <[email protected]>
90cf663
to
aa0aa4a
Compare
PTAL @thaJeztah @vvoland 🙏 |
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.
Just tested and it seems to work perfectly, thanks!
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! 🥳
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
closes #4089
- What I did
This is a follow-up of #4089 (comment) to enable bash completion for available plugins.
- How I did it
- How to verify it
To make it works with buildx plugin you need docker/buildx#1674
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
cc @silvin-lubecki @ulyssessouza