2

Here is what I learned so far:

# settings on mac
if [[ $(uname) == "Darwin" ]]; then
    # enable bash completion
    if [ -f `brew --prefix`/etc/bash_completion ]; then
            . `brew --prefix`/etc/bash_completion
    fi
    # enable git completion
    if [ -f `brew --prefix`/etc/bash_completion.d/git-completion.bash ]; then
    . `brew --prefix`/etc/bash_completion.d/git-completion.bash
    fi
fi

What if I have multiple scripts in `brew --prefix`/etc/bash_completion.d/? How can I enable all of them?

Or, is there a folder in OS X equivalent to /etc/bash_completion.d/ in linux?

1
  • The file, bash_completion that you're sourcing handles the sourcing of the individual files from the bash_completion.d directory.
    – slm
    Mar 18, 2015 at 2:02

0

You must log in to answer this question.

Browse other questions tagged .