Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: minor change to exit definition

...

When a complete expression is found, it is compiled and evaluated. The result of the evaluation is stored into the {_} variable.

Multi-line Expressions

...

No Format
groovy:000> help

For information about Groovy, visit:
    http://groovy.codehaus.org


Available commands:
  help     (\h ) Display this help message
  ?        (\? ) Alias to: help
  exit     (\x ) Exit the shell
  quit     (\q ) Alias to: exit
  import   (\i ) Import a class into the namespace
  display  (\d ) Display the current buffer
  clear    (\c ) Clear the buffer
  show     (\S ) Show variables, classes or imports
  inspect  (\n ) Inspect a variable or the last result with the GUI object browser
  purge    (\p ) Purge variables, classes, imports or buffers
  edit     (\e ) Edit the current buffer
  load     (\l ) Load a file or URL into the buffer
  .        (\. ) Alias to: load
  save     (\s ) Save the current buffer to a file
  record   (\r ) Record the current session to a file
  history  (\H ) Display, manage and recall edit-line history
  alias    (\a ) Create an alias
  set      (\= ) Set (or list) preferences

For help on a specific command type:
    help <command>

...

Exit the shell.

This is the only ay way to exit the shell. Well, you can still CTRL-C, but the shell will complain about an abnormal shutdown of the JVM.

...

No Format
groovy:000> class Foo {
groovy:001> def bar
groovy:002> def baz() {

groovy:003> display
  001> class Foo {
 002> def bar
 003> def baz() {

...

No Format
groovy:000> show variables

Variables:
  _ = true
show classes

...