Package org.jline.shell
package org.jline.shell
Clean shell API for building interactive command-line applications with JLine.
This package provides the core abstractions for commands, command groups, command dispatching, pipelines, and job management.
Architecture
jline-terminal ^ jline-reader ^ jline-shell (this module) ^ jline-console
Core Types
Command- a single executable commandCommandGroup- a named group of commandsCommandDispatcher- resolves and executes commandsCommandSession- execution context (terminal, I/O, variables)Shell- the REPL loopPipeline- parsed pipeline of commandsJob- job control
Quick Start
Shell shell = Shell.builder()
.prompt("myapp> ")
.groups(myGroup)
.build();
shell.run();
- Since:
- 4.0
-
ClassDescriptionManages command aliases for the shell.Describes a command argument with a name and optional description.Represents a single executable command in the shell.Describes a command for help display and widget integration.Builder for
CommandDescriptioninstances.Central dispatcher that aggregatesCommandGroups and handles command resolution, execution, and completion.A named group ofCommands for organization and discovery.Represents a parsed command line with its components.The type of description that should be displayed.Encapsulates the execution context for a command, including the terminal, I/O streams, session variables, working directory, and job state.Represents a job in the shell's job control system.Job lifecycle status.Listener for job status changes.Manages jobs in the shell's job control system.Expands variables and other expressions in a command line before parsing.Represents a pipeline of commands connected by operators such as pipes, redirections, and conditional connectors.Operators that connect commands in a pipeline.A single stage in a pipeline, consisting of a command line and the operator that follows it.Fluent builder for constructingPipelineinstances programmatically.Executes a script file line by line through aCommandDispatcher.An interactive shell that runs a read-eval-print loop (REPL) using aCommandDispatcherfor command execution.Builder for creatingShellinstances.This exception is thrown by anCommandDispatcherwhen it failed to find a requested command.