ant

...now browsing by tag

 
 

Bash Completion for Ant on OS X with Homebrew

Wednesday, March 23rd, 2011

Now that I’ve set this up, I can’t believe that it’s taken me so long to do it. A bit of googling turned up this blog post, which contained a link to this post in the comments. Since I’m using Homebrew instead of MacPorts, I had to tweak the instructions a bit:

  • Install bash_completion:

    brew install bash_completion

  • Next, add the following to the bottom of your .bashrc or .profile:

    if [ -f `brew --prefix`/etc/bash_completion ]; then
    . `brew --prefix`/etc/bash_completion
    fi
    complete -C /usr/share/ant/bin/complete-ant-cmd.pl ant