Package core
Class ShellInputHandler
java.lang.Object
core.ShellInputHandler
Handles the main shell loop, user input, prompt display, command history navigation, and tab
completion.
-
Constructor Summary
ConstructorsConstructorDescriptionShellInputHandler(CommandHandler handler, String[] builtins, String pathEnv) Constructs a ShellInputHandler with the given command handler, builtins, and PATH environment. -
Method Summary
-
Constructor Details
-
ShellInputHandler
Constructs a ShellInputHandler with the given command handler, builtins, and PATH environment.- Parameters:
handler- The CommandHandler instance.builtins- Array of builtin command names.pathEnv- The PATH environment variable.
-
-
Method Details
-
run
Runs the main shell loop, reading user input, handling special keys, and delegating command execution.- Parameters:
currentDirectory- The initial working directory.- Throws:
Exception- if an error occurs during shell operation.
-