Skip to content

zsh autocompletion: docker compose #3955

@mateusz-was

Description

@mateusz-was

Description

Hi!

Just finished setup of my new VM (Ubuntu + zsh + ohmyzsh) and discovered that:

  1. On zsh, using docker com [tab] doesn't have compose in it. It provides:
> docker com [tab]
commit     -- Create a new image from a container's changes
config     -- Manage Docker configs
container  -- Manage containers
context    -- Manage contexts
  1. Using the same on bash works without an issue.
  2. Using docker-compose [tab] works as expected.
  3. Using docker compose version works as expected. Any command written manually works ok.
  4. Using docker composer [tab] doesn't work (no suggestions).

Took a look on the https://github.com/docker/cli/tree/master/contrib/completion and, yup, there are no subcommands for compose for zsh.
Relevant config for bash is here: https://github.com/docker/cli/blob/master/contrib/completion/bash/docker#L5400

Small note, if you find this before the feature is implemented, the easiest workaround is using https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/docker-compose, which provides handy dco alias for docker-compose ;)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions