File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5395,6 +5395,23 @@ _docker_wait() {
53955395 _docker_container_wait
53965396}
53975397
5398+ BUILDX_PLUGIN_PATH=$( docker info --format ' {{range .ClientInfo.Plugins}}{{if eq .Name "buildx"}}{{.Path}}{{end}}{{end}}' )
5399+
5400+ _docker_buildx () {
5401+ local completionCommand=" __completeNoDesc"
5402+ local resultArray=($BUILDX_PLUGIN_PATH $completionCommand )
5403+ for value in " ${words[@]: 2} " ; do
5404+ if [ -z " $value " ]; then
5405+ resultArray+=( " ''" )
5406+ else
5407+ resultArray+=( " $value " )
5408+ fi
5409+ done
5410+ local result=$( eval " ${resultArray[*]} " 2> /dev/null | grep -v ' ^:[0-9]*$' )
5411+
5412+ COMPREPLY=( $( compgen -W " ${result} " -- " ${current-} " ) )
5413+ }
5414+
53985415COMPOSE_PLUGIN_PATH=$( docker info --format ' {{range .ClientInfo.Plugins}}{{if eq .Name "compose"}}{{.Path}}{{end}}{{end}}' )
53995416
54005417_docker_compose () {
@@ -5483,6 +5500,9 @@ _docker() {
54835500
54845501 local known_plugin_commands=()
54855502
5503+ if [ -f " $BUILDX_PLUGIN_PATH " ] ; then
5504+ known_plugin_commands+=(" buildx" )
5505+ fi
54865506 if [ -f " $COMPOSE_PLUGIN_PATH " ] ; then
54875507 known_plugin_commands+=(" compose" )
54885508 fi
You can’t perform that action at this time.
0 commit comments