Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
Completion script docs
Browse files Browse the repository at this point in the history
  • Loading branch information
leedm777 committed Oct 21, 2015
1 parent e4787d3 commit 77de66b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/completion/bash/docker-machine-prompt.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# source /some/where/docker-machine-prompt.bash
# 1b. Alternatively, just copy this file into into /etc/bash_completion.d
# 2. Change your PS1 to call __git_ps1 as command-substitution
# PS1='[\u@\h \W$(__docker-machine-ps1 " (%s)")]\$ '
# PS1='[\u@\h \W$(__docker-machine-ps1 " [%s]")]\$ '
#
# Configuration:
#
Expand Down
15 changes: 15 additions & 0 deletions docs/install-machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@ to your PATH.
$ docker-machine -v
machine version 0.5.0 (3e06852)

## Installing bash completion scripts

There are a [number of scripts](../contrib/completion/bash) which add command
completion, a function for showing the active machine in the shell prompt,
and a function wrapper which adds a `docker-machine use` subcommand, which
executes `eval "$(docker-machine env X)"` in the current shell.

To install the scripts, copy or link them into `/etc/bash_completion.d` or
`/usr/local/etc/bash_completion.d`. To enable the docker-machine shell prompt,
add `$(__docker-machine-ps1)` to your `PS1` setting in `~/.bashrc`.

PS1='[\u@\h \W$(__docker-machine-ps1)]\$ '

Further documentation can be found in the comments at the top of each script.

## Where to go next

* [Docker Machine overview](/)
Expand Down

0 comments on commit 77de66b

Please sign in to comment.