Created
July 10, 2017 10:19
-
-
Save rmsj/d5bfd52f80e30947dcaaffd9c3f43872 to your computer and use it in GitHub Desktop.
Docker auto complete on zsh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir ~/.zsh/completion | |
curl -L https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/plugins/docker/_docker > ~/.zsh/completion/_docker | |
curl -L https://raw.githubusercontent.com/docker/machine/master/contrib/completion/zsh/_docker-machine > ~/.zsh/completion/_docker-machine | |
curl -L https://raw.githubusercontent.com/docker/compose/master/contrib/completion/zsh/_docker-compose > ~/.zsh/completion/_docker-compose | |
Include the directory in your $fpath, e.g. by adding in ~/.zshrc: | |
fpath=(~/.zsh/completion $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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment