Grails 2.1 command line alias

18 / Aug / 2012 by Uday Pratap Singh 1 comments

I am a linux user and like to do everything on command line, I find it more productive. Anytime I need to write long command or use any command frequently, I always create an alias for that, for example while running the test cases I need to run the command so I created alias for this in my bashrc

[java]
alias testunit=’grails test-app unit:’
[/java]

But there are so many and my bashrc keeps on increasing (though I am least concern of this as I have separate file for this). Here is the good news, now grails 2.1 has its own support for aliases so I created the alias for running tests

[java]
grails alias unit test-app unit:
[/java]

and now I can run my test by typing

[java]
grails unit
[/java]

Actually grails reads and writes aliases to the file

[java].grails/.aliases[/java]

Now I can create the commonly used grails aliases in this file and share it with my team.
Isn’t it cool. Hope it helps

FOUND THIS USEFUL? SHARE IT

comments (1 “Grails 2.1 command line alias”)

Leave a Reply

Your email address will not be published. Required fields are marked *