mirror of
https://github.com/docker/compose.git
synced 2025-07-22 13:14:29 +02:00
Documentation for bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
69db596b5d
commit
2406a3936a
33
docs/completion.md
Normal file
33
docs/completion.md
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: Command Completion
|
||||||
|
---
|
||||||
|
|
||||||
|
Command Completion
|
||||||
|
==================
|
||||||
|
|
||||||
|
Fig comes with [command completion](http://en.wikipedia.org/wiki/Command-line_completion)
|
||||||
|
for the bash shell.
|
||||||
|
|
||||||
|
Installing Command Completion
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
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 script in `/etc/bash_completion.d/` (`/usr/local/etc/bash_completion.d/` on a Mac), using e.g.
|
||||||
|
|
||||||
|
curl -L https://raw.githubusercontent.com/docker/fig/master/contrib/completion/bash/fig > /etc/bash_completion.d/fig
|
||||||
|
|
||||||
|
Completion will be available upon next login.
|
||||||
|
|
||||||
|
Available completions
|
||||||
|
---------------------
|
||||||
|
Depending on what you typed on the command line so far, it will complete
|
||||||
|
|
||||||
|
- available fig commands
|
||||||
|
- options that are available for a particular command
|
||||||
|
- service names that make sense in a given context (e.g. services with running or stopped instances or services based on images vs. services based on Dockerfiles). For `fig scale`, completed service names will automatically have "=" appended.
|
||||||
|
- arguments for selected options, e.g. `fig kill -s` will complete some signals like SIGHUP and SIGUSR1.
|
||||||
|
|
||||||
|
Enjoy working with fig faster and with less typos!
|
@ -20,6 +20,8 @@ Next, install Fig:
|
|||||||
|
|
||||||
curl -L https://github.com/docker/fig/releases/download/1.0.1/fig-`uname -s`-`uname -m` > /usr/local/bin/fig; chmod +x /usr/local/bin/fig
|
curl -L https://github.com/docker/fig/releases/download/1.0.1/fig-`uname -s`-`uname -m` > /usr/local/bin/fig; chmod +x /usr/local/bin/fig
|
||||||
|
|
||||||
|
Optionally, install [command completion](completion.html) for the bash shell.
|
||||||
|
|
||||||
Releases are available for OS X and 64-bit Linux. Fig is also available as a Python package if you're on another platform (or if you prefer that sort of thing):
|
Releases are available for OS X and 64-bit Linux. Fig is also available as a Python package if you're on another platform (or if you prefer that sort of thing):
|
||||||
|
|
||||||
$ sudo pip install -U fig
|
$ sudo pip install -U fig
|
||||||
|
Loading…
x
Reference in New Issue
Block a user