updated url and download script (#2405)

* updated url and download script

* added separate Mac and Linux examples

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
This commit is contained in:
btro 2017-03-29 01:12:50 +02:00 committed by Victoria Bialas
parent 1fdf927714
commit efd7aa3661
1 changed files with 17 additions and 9 deletions

View File

@ -11,15 +11,23 @@ for the bash and zsh shell.
### Bash
Make sure bash completion is installed. If you use a current Linux in a non-minimal installation, bash completion should be available.
On a Mac, install with `brew install bash-completion`
Make sure bash completion is installed. If you are using a current version of Linux in a non-minimal installation, bash completion should be available.
Place the completion scripts in `/etc/bash_completion.d/` (`` `brew --prefix`/etc/bash_completion.d/`` on a Mac), using e.g.
On a Mac, install with `brew install bash-completion`.
files=(docker-machine docker-machine-wrapper docker-machine-prompt)
for f in "${files[@]}"; do
curl -L https://raw.githubusercontent.com/docker/machine/v$(docker-machine --version | tr -ds ',' ' ' | awk 'NR==1{print $(3)}')/contrib/completion/bash/$f.bash > `brew --prefix`/etc/bash_completion.d/$f
done
Place the completion script in `/etc/bash_completion.d/` as follows:
* On a Mac:
```none
curl -L https://raw.githubusercontent.com/docker/docker/master/contrib/completion/bash/docker > `brew --prefix`/etc/bash_completion.d/docker
```
* On a standard Linux installation:
```none
curl -L https://raw.githubusercontent.com/docker/docker/master/contrib/completion/bash/docker > /etc/bash_completion.d/docker
```
Completion will be available upon next login.
@ -29,7 +37,7 @@ Completion will be available upon next login.
Place the completion scripts in your `/path/to/zsh/completion`, using e.g. `~/.zsh/completion/`
mkdir -p ~/.zsh/completion
curl -L https://raw.githubusercontent.com/docker/machine/v$(docker-machine --version | tr -ds ',' ' ' | awk 'NR==1{print $(3)}')/contrib/completion/zsh/_docker-machine > ~/.zsh/completion/_docker-machine
curl -L https://raw.githubusercontent.com/docker/docker/master/contrib/completion/zsh/_docker > ~/.zsh/completion/_docker-machine
Include the directory in your `$fpath`, e.g. by adding in `~/.zshrc`
@ -48,4 +56,4 @@ Then reload your shell
## Available completions
**TODO**
<![end-metadata]-->
<![end-metadata]-->