https://github.com/leonhartx/docker-machine-zsh-completion
A more functional and up-to-date zsh completion for docker-machine
https://github.com/leonhartx/docker-machine-zsh-completion
autocompletion docker docker-machine zsh-completions
Last synced: 6 months ago
JSON representation
A more functional and up-to-date zsh completion for docker-machine
- Host: GitHub
- URL: https://github.com/leonhartx/docker-machine-zsh-completion
- Owner: leonhartX
- License: mit
- Created: 2016-04-24T06:30:16.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-08T09:40:28.000Z (about 8 years ago)
- Last Synced: 2025-03-23T13:01:59.862Z (7 months ago)
- Topics: autocompletion, docker, docker-machine, zsh-completions
- Size: 17.6 KB
- Stars: 15
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# docker-machine-zsh-completion
A more functional and up-to-date zsh completion for docker-machineThis has been merged in [docker-machine](https://github.com/docker/machine), but clone this repo to your completion path maybe a good way to easily keep it up-to-date.
## Installing Command Completion
### Manual installation
Place the completion scripts in your `/path/to/zsh/completion`, using e.g. `~/.zsh/completion/`mkdir -p ~/.zsh/completion
git clone https://github.com/leonhartX/docker-machine-zsh-completion.git ~/.zsh/completion/docker-machineInclude the directory in your `$fpath`, e.g. by adding in `~/.zshrc`
fpath=(~/.zsh/completion/docker-machine $fpath)
Make sure `compinit` is loaded or do it by adding in `~/.zshrc`
autoload -Uz compinit && compinit -i
Then reload your shell
exec $SHELL -l
### Using oh-my-zsh
If you use [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) then just clone the repository inside your oh-my-zsh repo:
git clone https://github.com/leonhartX/docker-machine-zsh-completion.git ~/.oh-my-zsh/custom/plugins/docker-machine
and enable it in your `.zshrc`:
plugins+=(docker-machine)
autoload -U compinit && compinit### Available completions
Depending on what you typed on the command line so far, it will complete- available docker-machine commands
- options that are available for a particular command
- machine names that make sense in a given context (e.g. `docker-machine ip` with only running machines vs. `docker-machine rm` with all machines).
- swarm discovery that are available to join in.
- driver options (e.g. `amazonec2-ami`) that are available for a particular driver after the `--driver,-d` options is specified.
- arguments for selected options, e.g. `docker-machine ls --filter` will complete some filter options like `driver` and `name`.