Interface Completers.CompletionEnvironment

Enclosing class:
Completers

public static interface Completers.CompletionEnvironment
Interface defining the environment for command completion.

This interface provides methods to access command information and evaluate completion expressions in a specific environment context.

  • Method Details

    • getCompletions

      Gets the available completions for commands.
      Returns:
      a map of command names to their completion data
    • getCommands

      Set<String> getCommands()
      Gets the set of available command names.
      Returns:
      a set of command names
    • resolveCommand

      String resolveCommand(String command)
      Resolves a command name to its canonical form.
      Parameters:
      command - the command name to resolve
      Returns:
      the resolved command name
    • commandName

      String commandName(String command)
      Gets the display name for a command.
      Parameters:
      command - the command to get the name for
      Returns:
      the display name of the command
    • evaluate

      Object evaluate(LineReader reader, ParsedLine line, String func) throws Exception
      Evaluates a function in the current environment context.
      Parameters:
      reader - the line reader
      line - the parsed command line
      func - the function to evaluate
      Returns:
      the result of the evaluation
      Throws:
      Exception - if an error occurs during evaluation