{"id":6257,"date":"2012-08-18T19:18:32","date_gmt":"2012-08-18T13:48:32","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=6257"},"modified":"2016-12-19T15:30:48","modified_gmt":"2016-12-19T10:00:48","slug":"grails-2-1-command-line-alias","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/grails-2-1-command-line-alias\/","title":{"rendered":"Grails 2.1 command line alias"},"content":{"rendered":"<p>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<\/p>\n<p>[java]<br \/>\nalias testunit=&#8217;grails test-app unit:&#8217;<br \/>\n[\/java]<\/p>\n<p>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 <a href=\"http:\/\/grails.org\/doc\/2.1.0\/ref\/Command%20Line\/alias.html\">aliases<\/a> so I created the alias for running tests<\/p>\n<p>[java]<br \/>\n grails alias unit test-app unit:<br \/>\n[\/java]<\/p>\n<p>and now I can run my test by typing<\/p>\n<p>[java]<br \/>\ngrails unit<br \/>\n[\/java]<\/p>\n<p>Actually grails reads and writes aliases to the file<\/p>\n<p>[java].grails\/.aliases[\/java]<\/p>\n<p>Now I can create the commonly used grails aliases in this file and <a title=\"Grails Reverse Engineers Team\" href=\"http:\/\/www.tothenew.com\/grails-application-development\">share it with my team<\/a>.<br \/>\nIsn&#8217;t it cool. Hope it helps<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2},"categories":[7],"tags":[870,871,872],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/6257"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=6257"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/6257\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=6257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=6257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=6257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}