diff --git a/contrib/completion/bash/docker-machine.bash b/contrib/completion/bash/docker-machine.bash index 70a3f4e216..9e4b8c293b 100644 --- a/contrib/completion/bash/docker-machine.bash +++ b/contrib/completion/bash/docker-machine.bash @@ -16,7 +16,7 @@ _docker_machine_active() { if [[ "${cur}" == -* ]]; then - COMPREPLY=($(compgen -W "--swarm --help" -- "${cur}")) + COMPREPLY=($(compgen -W "--help" -- "${cur}")) else COMPREPLY=() fi @@ -119,7 +119,7 @@ _docker_machine_restart() { _docker_machine_rm() { if [[ "${cur}" == -* ]]; then - COMPREPLY=($(compgen -W "--help --force" -- "${cur}")) + COMPREPLY=($(compgen -W "--help --force -y" -- "${cur}")) else # For rm, it's best to be explicit COMPREPLY=() @@ -215,7 +215,7 @@ _docker_machine_docker_machine() { _docker_machine() { COMPREPLY=() - local commands=(active config create env inspect ip kill ls regenerate-certs restart rm ssh scp start status stop upgrade url help) + local commands=(active config create env inspect ip kill ls regenerate-certs restart rm ssh scp start status stop upgrade url version help) local flags=(--debug --native-ssh --github-api-token --bugsnag-api-token --help --version) local wants_dir=(--storage-path) diff --git a/docs/completion.md b/docs/completion.md index d6c7b66cc8..dde114d755 100644 --- a/docs/completion.md +++ b/docs/completion.md @@ -25,7 +25,7 @@ Place the completion scripts in `/etc/bash_completion.d/` (`` `brew --prefix`/et 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 | awk 'NR==1{print $(NF-1)}')/contrib/completion/bash/$f.bash > `brew --prefix`/etc/bash_completion.d/$f + 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 Completion will be available upon next login. @@ -40,7 +40,7 @@ Place the completion scripts in your `/path/to/zsh/completion`, using e.g. `~/.z mkdir -p ~/.zsh/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 | awk 'NR==1{print $(NF-1)}')/contrib/completion/zsh/$f > ~/.zsh/completion/_$f + curl -L https://raw.githubusercontent.com/docker/machine/v$(docker-machine --version | tr -ds ',' ' ' | awk 'NR==1{print $(3)}')/contrib/completion/zsh/$f > ~/.zsh/completion/_$f done Include the directory in your `$fpath`, e.g. by adding in `~/.zshrc`