From a05f60ca0527e53dfcd20915e4502553951b229a Mon Sep 17 00:00:00 2001 From: dockertopia Date: Mon, 22 Aug 2022 13:29:01 +0100 Subject: [PATCH 1/2] Removing the completion.md file --- compose/completion.md | 133 ------------------------------------------ 1 file changed, 133 deletions(-) delete mode 100644 compose/completion.md diff --git a/compose/completion.md b/compose/completion.md deleted file mode 100644 index c98941a58a..0000000000 --- a/compose/completion.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -description: Compose CLI reference -keywords: fig, composition, compose, docker, orchestration, cli, reference -title: Command-line completion ---- - -Compose comes with [command completion](https://en.wikipedia.org/wiki/Command-line_completion) -for the bash and zsh shell. - -## Install command completion - -### Bash - -Make sure bash completion is installed. - -#### Linux - -1. On a current Linux OS (in a non-minimal installation), bash completion should be -available. - -2. Place the completion script in `/etc/bash_completion.d/`. - - ```console - $ sudo curl \ - -L https://raw.githubusercontent.com/docker/compose/{{site.compose_version}}/contrib/completion/bash/docker-compose \ - -o /etc/bash_completion.d/docker-compose - ``` - -3. Reload your terminal. You can close and then open a new terminal, or reload your setting with `source ~/.bashrc` command in your current terminal. - -#### Mac - -##### Install via Homebrew - -1. Install with `brew install bash-completion`. -2. After the installation, Brew displays the installation path. Make sure to place the completion script in the path. - - For example, place the completion script in `/usr/local/etc/bash_completion.d/`. - - ```console - $ sudo curl \ - -L https://raw.githubusercontent.com/docker/compose/{{site.compose_version}}/contrib/completion/bash/docker-compose \ - -o /usr/local/etc/bash_completion.d/docker-compose - ``` - -3. Add the following to your `~/.bash_profile`: - - ```bash - if [ -f $(brew --prefix)/etc/bash_completion ]; then - . $(brew --prefix)/etc/bash_completion - fi - ``` - -4. You can source your `~/.bash_profile` or launch a new terminal to utilize -completion. - -##### Install via MacPorts - -1. Run `sudo port install bash-completion` to install bash completion. - -2. Add the following lines to `~/.bash_profile`: - - ```bash - if [ -f /opt/local/etc/profile.d/bash_completion.sh ]; then - . /opt/local/etc/profile.d/bash_completion.sh - fi - ``` - -3. You can source your `~/.bash_profile` or launch a new terminal to utilize -completion. - -### Zsh - -Make sure you have [installed `oh-my-zsh`](https://ohmyz.sh/) on your computer. - -#### With oh-my-zsh shell - -Add `docker` and `docker-compose` to the plugins list in `~/.zshrc` to run -autocompletion within the oh-my-zsh shell. In the following example, `...` -represent other Zsh plugins you may have installed. After that, type `source ~/.zshrc` to bring the changes. -To test whether it is successful, type `docker ps` and then press the **Tab** key. - -```shell -plugins=(... docker docker-compose) - ``` - -#### Without oh-my-zsh shell - -1. Place the completion script in your `/path/to/zsh/completion` (typically `~/.zsh/completion/`): - - ```console - $ mkdir -p ~/.zsh/completion - $ curl \ - -L https://raw.githubusercontent.com/docker/compose/{{site.compose_version}}/contrib/completion/zsh/_docker-compose \ - -o ~/.zsh/completion/_docker-compose - ``` - -2. Include the directory in your `$fpath` by adding in `~/.zshrc`: - - ```shell - fpath=(~/.zsh/completion $fpath) - ``` - -3. Make sure `compinit` is loaded or do it by adding in `~/.zshrc`: - - ```shell - autoload -Uz compinit && compinit -i - ``` - -4. Then reload your shell: - - ```console - $ exec $SHELL -l - ``` - -## Available completions - -Depending on what you typed on the command line so far, it completes: - - - available docker-compose commands - - options that are available for a particular command - - service names that make sense in a given context, such as services with running or stopped instances or services based on images vs. services based on Dockerfiles. For `docker-compose scale`, completed service names automatically have "=" appended. - - arguments for selected options. For example, `docker-compose kill -s` completes some signals like SIGHUP and SIGUSR1. - -Enjoy working with Compose faster and with fewer typos! - -## Compose documentation - -- [User guide](index.md) -- [Installing Compose](install/index.md) -- [Command line reference](reference/index.md) -- [Compose file reference](compose-file/index.md) -- [Sample apps with Compose](samples-for-compose.md) From ceb3ba021fa1d45d1cbfc0bd1bc366432f183609 Mon Sep 17 00:00:00 2001 From: dockertopia Date: Mon, 22 Aug 2022 15:36:45 +0100 Subject: [PATCH 2/2] Adding redirect to compose index --- compose/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/compose/index.md b/compose/index.md index 6e7ee58692..43167e459b 100644 --- a/compose/index.md +++ b/compose/index.md @@ -7,6 +7,7 @@ redirect_from: - /compose/networking/swarm/ - /compose/overview/ - /compose/swarm/ + - /compose/completion/ --- >**Looking for Compose file reference?** [Find the latest version here](compose-file/index.md).