Add instructions to activate zsh completion (#5453)

This commit is contained in:
Alejandro Avilés 2017-12-15 00:22:52 +01:00 committed by Joao Fernandes
parent d3acb9fdef
commit 9f9726dfe1
1 changed files with 14 additions and 3 deletions

View File

@ -468,12 +468,13 @@ how to set the client TLS certificate for verification, see [Verify repository
client with certificates](/engine/security/certificates.md) in the Docker Engine
topics.
## Install bash completion
## Install completion
If you are using [bash
completion](https://www.debian-administration.org/article/316/An_introduction_to_bash_completion_part_1),
such as [homebrew bash-completion on
Mac](http://davidalger.com/development/bash-completion-on-os-x-with-brew/) bash
Mac](http://davidalger.com/development/bash-completion-on-os-x-with-brew/), or
the [zsh completion system](http://zsh.sourceforge.net/Doc/Release/Completion-System.html)
completion scripts for the following commands may be found inside `Docker.app`,
in the `Contents/Resources/etc/` directory:
@ -482,7 +483,7 @@ in the `Contents/Resources/etc/` directory:
- docker-compose
To activate bash completion, these files need to be copied or symlinked to your
`bash_completion.d/` directory. For example, if you use
`bash_completion.d/` directory. For example, if you installed bash via
[Homebrew](http://brew.sh/):
```bash
@ -491,6 +492,16 @@ ln -s /Applications/Docker.app/Contents/Resources/etc/docker-machine.bash-comple
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-compose.bash-completion /usr/local/etc/bash_completion.d/docker-compose
```
To activate zsh completion, these files need to be copied or symlinked to your
zsh `site-functions/` directory. For example, if you installed zsh via
[Homebrew](http://brew.sh/):
```bash
ln -s /Applications/Docker.app/Contents/Resources/etc/docker.zsh-completion /usr/local/share/zsh/site-functions/_docker
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-machine.zsh-completion /usr/local/share/zsh/site-functions/_docker-machine
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-compose.zsh-completion /usr/local/share/zsh/site-functions/_docker-compose
```
## Give feedback and get help
To get help from the community, review current user topics, join or start a