When using Maven (
mvn) on OS X Terminal, how can I get tab-completion for Maven goals, plugin names, etc? Things like this:
mvn pa [TAB] -> mvn package mvn je [TAB][TAB] -> mvn jetty:run
Maven doesn't ship with an auto-complete script, but there's a project on GitHub called Maven Bash Completetion.
Installation if you use Homebrew:
Otherwise, use this command to download the latest script (to your home directory as
Then add this to your
That's it. After you restart bash (e.g. open a new Terminal window), Maven autocomplete should work.