-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add bash completion for docker-buildx plugin #4089
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
Signed-off-by: CrazyMax <github@crazymax.dev>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4089 +/- ##
==========================================
- Coverage 59.15% 59.14% -0.01%
==========================================
Files 285 287 +2
Lines 24725 24741 +16
==========================================
+ Hits 14627 14634 +7
- Misses 9212 9221 +9
Partials 886 886 |
|
Guess it won't hurt to have it in this script, although we now also have the Cobra-generated completion in the CLI on master (and 23.0+) since #3429 |
Yeah but it doesn't work for plugins afaik: Compose works because there is the bash completion available I guess. |
| _docker_container_wait | ||
| } | ||
|
|
||
| BUILDX_PLUGIN_PATH=$(docker info --format '{{range .ClientInfo.Plugins}}{{if eq .Name "buildx"}}{{.Path}}{{end}}{{end}}') |
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.
Maybe for a follow-up, but I think we should try to make it generic for plugins. We should call docker info only once and process the result, depending the plugin name.
It might be tricky though, so maybe for a follow-up 🤔
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 for your feedback. I will make it more generic to support all plugins. Keep you posted.
- What I did
I was working on targets completion for the
buildx bakecommand in docker/buildx#1674 and found out we don't have any bash completion for docker-buildx plugin.- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)