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.

- - ### 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.

- - ### 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