diff --git a/machine/completion.md b/machine/completion.md index f0dca6bb95..bc6d951c96 100644 --- a/machine/completion.md +++ b/machine/completion.md @@ -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** - \ No newline at end of file +