Class Shell

java.lang.Object
org.jline.shell.Shell
All Implemented Interfaces:
AutoCloseable

public class Shell extends Object implements AutoCloseable
An interactive shell that runs a read-eval-print loop (REPL) using a CommandDispatcher for command execution.

The shell is a thin REPL loop. The dispatcher is injected or auto-created as a DefaultCommandDispatcher.

Use builder() to create a shell:

 Shell shell = Shell.builder()
     .terminal(terminal)
     .prompt("myapp> ")
     .dispatcher(dispatcher)
     .groups(group1, group2)
     .build();
 shell.run();
 
Since:
4.0
See Also: