Package builtins

Class TypeCommand

java.lang.Object
builtins.TypeCommand
All Implemented Interfaces:
Command

public class TypeCommand extends Object implements Command
Implements the 'type' builtin command.
  • Constructor Details

    • TypeCommand

      public TypeCommand()
      Constructs a new TypeCommand instance. Initializes the built-in 'type' command.
  • Method Details

    • execute

      public Path execute(String[] args, String rawInput, Path currentDirectory)
      Prints how each argument would be interpreted if used as a command name.
      Specified by:
      execute in interface Command
      Parameters:
      args - The command and its arguments.
      rawInput - The raw input string.
      currentDirectory - The current working directory.
      Returns:
      The current directory (unchanged).