reworked my g alias into a function that handles old stype grails (without grailsw) and newer grails (with grailsw.)