Ubuntu-like bash completion in Mac OS X?
The easiest way is to install bash-completion from homebrew and follow the provided instructions.

Example output:

==&gt; Downloading https://homebrew.bintray.com/bottles/bash-completion-1.3.mavericks.bottle.tar.gz
######################################################################## 100.0%
==&gt; Pouring bash-completion-1.3.mavericks.bottle.tar.gz
==&gt; Caveats
Add the following lines to your ~/.bash_profile:
    if [ -f "$(brew --prefix)/etc/bash_completion" ]; then
        source "$(brew --prefix)/etc/bash_completion"
    fi

The Homebrew bash completion script has been installed to:
    /usr/local/etc/bash_completion.d

Bash completion has been installed to:
    /usr/local/etc/bash_completion.d
==&gt; Summary
  /usr/local/Cellar/bash-completion/1.3: 188 files, 1.1M


Once you are done, you can create your own scripts under /usr/local/etc/bash_completion.d/.