Tuesday, 6 October 2015

Groovy Commands Reference

The groovy shell has a quite number of different commands, which provide rich access to the groovy shell’s environment.

Commands all have a shortcut (which is something like \h) and a name . The commands may also have some predefined system aliases. The users may also create their own aliases.



1.4.1. Recognized Commands

help

To display the list of commands or the help text for specific command.

The Groovy Command List

groovy:000> : i.e help

The Available commands:

 :help      (:h ) Will display this help message
  ?          (:? ) An alias to: ->help
  :exit      (:x ) Exiting the shell
  :quit      (:q ) An alias to: :exit
  import     (:i ) Importing a class into the namespace
  :display   (:d ) To display the current buffer
  :clear     (:c ) Clearing the buffer and resetting the prompt counter.
  :show      (:S ) Show’s variables, imports or classes
  :inspect   (:n ) Inspecting a variable or the last result with the GUI object browser
  :purge     (:p ) Purging variables, classes, imports or preferences
  :edit      (:e ) Editing the current buffer
  :load      (:l ) Loading a file or URL into the buffer
  .          (:. ) An alias to: ->load
  :save      (:s ) Saving the current buffer to a file
  :record    (:r ) Recording the current session to a file
  :history   (:H ) Displaying, managing and recalling edit-line history
  :alias     (:a ) Create an alias
  :set       (:= ) List or set preferences
  :register  (:rc) Registering a new command with the shell
  :doc       (:D ) This Opens a browser window displaying the specific doc for the argument

For help on a specific command just type:

    :help <command>

Help for a Command

While in the interactive groovy shell, you can ask for help for a specific command to get more details about it's function or syntax.

To Know More About Groovy language Reference Visit us..




No comments:

Post a Comment