GitHunt
HA

halostatue-archive/fish-docker

Docker and Docker Compose completions for the Fish Shell

halostatue/fish-docker

Important

This plugin will no longer be updated. Prefer using the docker.fish
vendor completions provided in your docker package.

Version

Completions for Docker in the fish shell, based on
docker-fish-completion.

Comparisons with Other Docker Completions

  • Docker contrib completions (docker and
    docker-compose): These are generated by
    docker-fish-completion, and the Ruby script is substantially more accurate.
    Also, the docker-compose completions are a fraction of what can be discovered.

  • lewisacidic/fish-docker: In addition to using the Docker contrib
    completions, but also adds a number of additional helper functions that aren't
    wanted by this author.

    If these functions are desired, but more accurate completions are required,
    ensure that halostatue/fish-docker is added by Fisher after
    lewisacidic/fish-docker (it should be later in your fish_plugins file).

Installation

Install with Fisher (recommended):

fisher install halostatue/fish-docker@v1.x
Not using a package manager?

Copy completions/*.fish and conf.d/*.fish to your fish configuration
directory preserving the directory structure.

System Requirements

  • fish 3.0+
  • Docker
  • Ruby 2.6 or later (to generate completions).

gen_completions.rb

Ported from the Python script in docker-fish-completion to Ruby, fixing
some bugs along the way. This should be considered the initial version of the
script, as it does what the Python version did and no more. The plans are to
simplify the generation process further so that the completions are more
readily updated in place, and that commands that themselves have subcommands
can be handled.

It has been tested with Ruby 2.7.

Usage / Updating

A Makefile has been added to make building this easier.

make
# OR

make docker
make docker-compose

# OR
./gen_completions.rb docker > completions/docker.fish
./gen_completions.rb docker-compose > completions/docker-compose.fish

Licence

MIT

Change Log

CHANGELOG

Contributing

Languages

Shell84.8%Ruby14.9%Makefile0.3%

Contributors

MIT License
Created December 31, 2019
Updated November 22, 2025