The Wayback Machine - https://web.archive.org/web/20251113125428/https://github.com/docker/buildx/pull/1727
Skip to content

Conversation

@crazy-max
Copy link
Member

@crazy-max crazy-max commented Apr 9, 2023

closes #1674
partially solves #1072

Add completion to:

  • List builder names for --builder persistent flag and as arg for some cmds
  • Folders (context) for build command
  • List bake targets
$ docker __completeNoDesc buildx --builder ""
builder
builder2
buildkit0106
buildkit093
remote-builder
default
desktop-linux
docker201016
docker2300
docker2400
:4
Completion ended with directive: ShellCompDirectiveNoFileComp
$ docker __completeNoDesc buildx --builder "do"
docker201016
docker2300
docker2400
:4
Completion ended with directive: ShellCompDirectiveNoFileComp

For bake, can be tested within this repo:

$ docker __completeNoDesc buildx ""
bake
build
create
du
help
imagetools
inspect
ls
prune
rm
stop
use
version
:4
Completion ended with directive: ShellCompDirectiveNoFileComp
$ docker __completeNoDesc buildx bake ""
default
validate
meta-helper
_common
lint
validate-vendor
validate-docs
validate-authors
validate-generated-files
update-vendor
update-docs
update-authors
update-generated-files
mod-outdated
test
binaries
binaries-cross
release
image
image-cross
image-local
:4
Completion ended with directive: ShellCompDirectiveNoFileComp
$ docker __completeNoDesc buildx bake "v"
validate
validate-vendor
validate-docs
validate-authors
validate-generated-files
:4
Completion ended with directive: ShellCompDirectiveNoFileComp
@crazy-max crazy-max marked this pull request as ready for review April 11, 2023 07:34
@crazy-max crazy-max requested review from jedevc and tonistiigi April 11, 2023 07:35
crazy-max and others added 4 commits April 11, 2023 11:32
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@jedevc jedevc added this to the v0.11.0 milestone Apr 11, 2023
@crazy-max crazy-max merged commit 621b07c into docker:master May 9, 2023
@crazy-max crazy-max deleted the cmd-completion branch May 9, 2023 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants