Package: org.apache.groovy.groovysh.jline

## [Groovy] Class GroovySystemRegistry

- org.apache.groovy.groovysh.jline.GroovySystemRegistry

-     class GroovySystemRegistry
      extends SystemRegistryImpl

  Specializes the JLine system registry for groovysh pipeline syntax and assignments.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class SystemRegistryImpl` | `configPath, parser, workDir`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GroovySystemRegistry(Parser parser, Terminal terminal, Supplier<Path> workDir, ConfigurationPath configPath)` Creates the system registry used by groovysh.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `Object` | `execute(String line)` Executes a shell line after normalizing groovysh-specific syntax.
    `` | `boolean` | `isCommandOrScript(String command)` Determines whether the token should be handled as a command or script name.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class SystemRegistryImpl` | `addCompleter, cleanUp, close, commandAliases, commandDescription, commandDescription, commandInfo, commandNames, compileCompleters, completer, consoleEngine, consoleOption, consoleOption, execute, getPipeNames, groupCommandsInHelp, hasCommand, initialize, invoke, isCommandAlias, isCommandOrScript, isCommandOrScript, register, rename, renameLocal, setCommandRegistries, setConsoleOption, setGroupCommandsInHelp, setScriptDescription, terminal, trace, trace`

- - ### Constructor Detail

    - #### GroovySystemRegistry(Parser parser, Terminal terminal, Supplier<Path> workDir, ConfigurationPath configPath)

      Creates the system registry used by groovysh.

      Parameters:
        `parser` - command parser
        `terminal` - active terminal
        `workDir` - supplier for the current working directory
        `configPath` - configuration lookup path

  - ### Method Detail

    - #### @Override
      Object execute(String line)

      Executes a shell line after normalizing groovysh-specific syntax.

      throws:
        Exception if command execution fails
      Parameters:
        `line` - command line to execute
      Returns:
        the command result

    - #### @Override
      boolean isCommandOrScript(String command)

      Determines whether the token should be handled as a command or script name.

      Parameters:
        `command` - token to inspect
      Returns:
        `true` if the token maps to a command or script