Package builtins

Class NoOpCommand

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

public class NoOpCommand extends Object implements Command
Represents a no-operation command (used for error handling or unknown commands).
  • Constructor Details

    • NoOpCommand

      public NoOpCommand()
      Constructs a new NoOpCommand instance. Initializes the built-in no-operation command, which is used as a fallback for unknown or invalid commands.
  • Method Details

    • execute

      public Path execute(String[] args, String rawInput, Path currentDirectory)
      Exits the shell with the given status code.
      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 (unreachable).