halostatue / fish-docker

Docker and Docker Compose completions for the Fish Shell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

halostatue/fish-docker

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

About

Docker and Docker Compose completions for the Fish Shell

License:MIT License


Languages

Language:Shell 84.8%Language:Ruby 14.9%Language:Makefile 0.3%