gnodet opened a new pull request, #22161: URL: https://github.com/apache/camel/pull/22161
## Summary Migrate the Camel JBang `shell` command from the old `picocli-shell-jline3` bridge pattern to the new JLine 4 `Shell` builder API. **Before:** ~90 lines of manual REPL boilerplate — creating Terminal, Parser, SystemRegistry, LineReader, TailTipWidgets, key bindings, and a manual read-execute loop with explicit `UserInterruptException`/`EndOfFileException` handling. **After:** ~15 lines using `org.jline.shell.Shell.builder()` with a single `shell.run()` call. ### Changes - **Shell.java**: Replaced manual REPL loop with `Shell.builder()` + `PicocliCommandRegistry` from JLine 4. Removed the custom `ReplHighlighter` inner class in favor of the built-in `commandHighlighter(true)`. - **pom.xml**: Removed `picocli-shell-jline3` dependency (no longer needed). Added `jline-picocli` dependency (provides `PicocliCommandRegistry` which bridges picocli `CommandLine` into JLine 4 shell). ### New features gained from JLine 4 Shell - Built-in pipeline support (command chaining with `|`, `>`, `>>`) - Built-in alias management - Job control - Script support - Built-in `history` command (`historyCommands(true)`) - Built-in `help` command (`helpCommands(true)`) - Command-aware syntax highlighting (`commandHighlighter(true)`) ### Notes - The class remains named `Shell` (no rename needed). The JLine `org.jline.shell.Shell` type is referenced via fully qualified name to avoid import conflict. - The `jline` uber jar (4.0.7) includes the `org.jline.shell` package but not the `org.jline.picocli` package, so `jline-picocli` is added as a separate dependency. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
