Package core

Class TabCompleter

java.lang.Object
core.TabCompleter

public class TabCompleter extends Object
Provides tab completion for built-in and external commands.
  • Constructor Details

    • TabCompleter

      public TabCompleter(String[] builtins, String pathEnv)
      Constructs a TabCompleter with the given builtins and PATH environment.
      Parameters:
      builtins - Array of builtin command names.
      pathEnv - The PATH environment variable.
  • Method Details

    • complete

      public String complete(String currentInput)
      Returns the completed command or argument based on the current input.
      Parameters:
      currentInput - The current input string.
      Returns:
      The completed input string.