Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.2.0-rc-1
Description
Groovysh oofers several commands, as listed here:
http://groovy.codehaus.org/Groovy+Shell#GroovyShell-RecognizedCommands
The problem with those commands right now is that they overlap in namespace with variable/function names.
Other similar REPLs have solved this by using command prefixes. E.g. scala:
:cp
:help
Or ipython
%alias:
%autocall:
The issue appears when trying to define variables that are already taken as command names:
groovy:000> save = 3
Command 'save' requires a single file argument
Which is very annoying when copy/pasting code, and having to rename a variable.
So I suggest adding a command prefix to groovysh for most commands (except maybe "import", such as a colon (like Scala for conformity), or '\' as used in groovysh already for shortcuts.