Class PosixCommandsRegistry

java.lang.Object
org.jline.builtins.PosixCommandsRegistry

public class PosixCommandsRegistry extends Object
Registry for POSIX commands that provides a convenient way to register and execute POSIX commands in JLine applications.

This class acts as a bridge between command frameworks and the PosixCommands implementations, making it easy to integrate POSIX commands into any command-line application.

Usage Example:


 Terminal terminal = TerminalBuilder.builder().build();
 Path currentDir = Path.of(".");

 PosixCommandsRegistry registry = new PosixCommandsRegistry(
     terminal.input(),
     new PrintStream(terminal.output()),
     new PrintStream(terminal.output()),
     currentDir,
     terminal
 );

 // Execute a command
 registry.execute("ls", new String[]{"ls", "-l"});