From e207ae1a1950a356a49f5a9aa1dee47bbcbc4958 Mon Sep 17 00:00:00 2001 From: David Stosik Date: Mon, 9 Nov 2015 21:08:53 +0900 Subject: [PATCH] Document command-line completion installation This is a draft based on [the same doc for docker-compose](https://github.com/docker/compose/blob/master/docs/completion.md). It still needs changes, but will get the thing moving. Signed-off-by: David Stosik --- docs/completion.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 docs/completion.md diff --git a/docs/completion.md b/docs/completion.md new file mode 100644 index 0000000000..d6c7b66cc8 --- /dev/null +++ b/docs/completion.md @@ -0,0 +1,62 @@ + + +# Command-line Completion + +Docker Machine comes with [command completion](http://en.wikipedia.org/wiki/Command-line_completion) +for the bash shell. + +## Installing Command Completion + +### 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` + +Place the completion scripts in `/etc/bash_completion.d/` (`` `brew --prefix`/etc/bash_completion.d/`` on a Mac), using e.g. + + 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 + done + +Completion will be available upon next login. + + + +## Available completions + +**TODO**