Skip to content
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

[bug] zsh completion contains trailing '*' #3631

Closed
Freed-Wu opened this issue May 22, 2022 · 3 comments · Fixed by #3540
Closed

[bug] zsh completion contains trailing '*' #3631

Freed-Wu opened this issue May 22, 2022 · 3 comments · Fixed by #3540

Comments

@Freed-Wu
Copy link

Description

Describe the results you received:

In zsh:

❯ docker build<Tab>
docker command
build       Build an image from a Dockerfile
builder     Manage builds
buildx*     Docker Buildx (Docker Inc., v0.8.2-docker)
❯ docker buildx\*
docker: 'buildx*' is not a docker command.
See 'docker --help'

The correct command should be buildx without a trailing *.

Describe the results you expected:

❯ docker build<Tab>
docker command
build       Build an image from a Dockerfile
builder     Manage builds
buildx      Docker Buildx (Docker Inc., v0.8.2-docker)
❯ docker buildx
...

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client:
 Version:           20.10.16
 API version:       1.41
 Go version:        go1.18.1
 Git commit:        aa7e414fdc
 Built:             Sat May 14 12:48:33 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.16
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.1
  Git commit:       f756502055
  Built:            Sat May 14 12:47:27 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.6.4
  GitCommit:        212e8b6fa2f44b9c21b2798135fc6fb7c53efc16.m
 runc:
  Version:          1.1.2
  GitCommit:        
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.8.2-docker)
  compose: Docker Compose (Docker Inc., 2.5.0)

Server:
 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 1
 Server Version: 20.10.16
 Storage Driver: btrfs
  Build Version: Btrfs v5.17 
  Library Version: 102
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runtime.v1.linux runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 212e8b6fa2f44b9c21b2798135fc6fb7c53efc16.m
 runc version: 
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.17.7-arch1-1
 Operating System: Arch Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.651GiB
 Name: arch
 ID: XDJC:U66O:4UGS:S6FA:HBPN:HUW4:W3PF:KC7D:VUUX:32O4:4O7F:7SAG
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: freedwu
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Registry Mirrors:
  https://dockerhub.azk8s.cn/
 Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.):

❯ uname -r
5.17.7-arch1-1
@ndeloof
Copy link
Contributor

ndeloof commented May 30, 2022

We just merged support for dynamic completion (#3429) that will let you generate completion script for your shell as docker completion zsh. While completion support is still to be polished, this should avoid such issue with hand-maintained scripts

@thaJeztah
Copy link
Member

This was fixed in #3540 on master (it's not yet in a release though)

Let me close this ticket 👍

@thaJeztah
Copy link
Member

opened a backport for the 20.10 branch; #3648

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants