Bash completion for Grails
I have been using Grails a bit recently (may be the subject of a Blog entry later). There is often the need dive out to the command line to run stuff like:
This has coincided with wanting to learn more about the auto complete feature of bash. I found this tip from Doyle of DoyleCentral.com but, to me, it is deficient in that it has a hard coded list of Grails targets. So, I decided to spin my own that gets the list of targets from Grails. Here is what I put into my .bashrc
file:
This approach uses the variable GRAILS\_TARGETS
to contain the list of Grails targets. It is lazily evaluated as it is expensive to calculate. Now of course you may still prefer the other approach.
PS: I am back to using Emacs Muse for writing Blog entries.