This page is dedicated to the discussion of what the Groovy Shell (aka.
groovysh) and Groovy Console (aka.
groovyConsole) should be able to do in the future. So please go on and add suggestions.
Wishlist for the command-line Groovy Shell (aka.
- keep imports
- remove the requirement for the "go" command
- proposal: read lines until one is entered WITHOUT a trailing semicolon or as long as there are open parantheses; change prompt for continuation lines
- the value of last expression evaluated is made available in a variable. The name of the variable is short , e.g. "res". It is also automatically printed to the console (including type?).
- alternate name: "_" or "_r"
- code completion for known methods, DGM, and symbols used so far
- dump transcript to file
- nice to have: dump classes and methods that were previously defined
- nice to have: run code in new jdb console
- all the above, and...
- possibility to discard imports (since we can keep imports, let's flush them too)
- Crazy idea: I'm wondering whether we could leverage ANSI colours in the shell so that we can have some text in colours (perhaps even syntax highlighting???)
- learn from Python and especially IPython (sys.displayhook etc.)
- (GNU) readline support
additionally: enhance ObjectBrowser to execute selected methods and change the "object under inspection" to the result of that method call. Keep an expression of how to get to that object (e.g. GPath). Let ObjectBrowser return this expression and make groovysh and groovyConsole arware of it such that groovysh user can use the inspect command to interactively construct such expressions.
Wishlist for the Swing Console (aka.
- basic syntax highlighting in source code
- line numbers (be able to turn on / off)
- be able to specify some .jar files that will be included into the classpath
- enable standard-de-facto ctrl+z for undo and ctrl+y for redo
- code formatting
- step-by-step execution of statements
- improve variables insight for clarity