From 9c4f7e09afd4d9079e0778299ea520f29b9ff39e Mon Sep 17 00:00:00 2001 From: Jarrod Pooler Date: Thu, 20 Apr 2017 11:44:20 -0500 Subject: [PATCH] Update bash completion steps and add MacPorts steps (#2910) --- compose/completion.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/compose/completion.md b/compose/completion.md index 82de02a04a..095b73476a 100644 --- a/compose/completion.md +++ b/compose/completion.md @@ -18,7 +18,24 @@ Place the completion script in `/etc/bash_completion.d/` (`/usr/local/etc/bash_c curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose -Completion will be available upon next login. +Then add the following to your `~/.bash_profile` + + if [ -f $(brew --prefix)/etc/bash_completion ]; then + . $(brew --prefix)/etc/bash_completion + fi + +You can source your `~/.bash_profile` or launch a new terminal to utilize completion. + +## MacPorts Bash Completion + +If you're using MacPorts you'll need to slightly modify your steps to the following +Run `sudo port install bash-completion` to install bash completion + + if [ -f /opt/local/etc/profile.d/bash_completion.sh ]; then + . /opt/local/etc/profile.d/bash_completion.sh + fi + + You can source your `~/.bash_profile` or launch a new terminal to utilize completion. ### Zsh