How to install the debian bash-completion using homebrew?

1

I want bash to install bash command completion on my mac using brew.

Michael_Scharf

Posted 2014-10-01T12:26:16.020

Reputation: 521

Answers

3

install bash-completion

brew install bash-completion

Do not forget to add the following snippet to your .bash_profile:

if [ -f `brew --prefix`/etc/bash_completion ]; then 
    . `brew --prefix`/etc/bash_completion 
fi

This will include the completion commands into your interactive bash in Terminal.app.

To add a new completion script, just drop it into the bash_completion.d directory

cp my_completion_script `brew --prefix`/etc/bash_completion.d

Michael_Scharf

Posted 2014-10-01T12:26:16.020

Reputation: 521