This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch CAMEL-23226-all-jbang-ux
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 4f4396b0d0e49228acfd3db4afd2de69b696e976
Author: Guillaume Nodet <[email protected]>
AuthorDate: Sat Mar 21 10:28:47 2026 +0100

    CAMEL-23226: Add POSIX, interactive, and script commands to JBang shell
    
    Add PosixCommandGroup (cd, ls, grep, cat, head, tail, etc.),
    InteractiveCommandGroup (nano, less, ttop), and enable
    script/variable commands for a richer shell experience.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 .../main/java/org/apache/camel/dsl/jbang/core/commands/Shell.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Shell.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Shell.java
index b8a5f17a3a8e..433ba21d9c5a 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Shell.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Shell.java
@@ -20,6 +20,8 @@ import java.nio.file.Path;
 import java.nio.file.Paths;
 
 import org.apache.camel.util.HomeHelper;
+import org.jline.builtins.InteractiveCommandGroup;
+import org.jline.builtins.PosixCommandGroup;
 import org.jline.picocli.PicocliCommandRegistry;
 import org.jline.reader.LineReader;
 import picocli.CommandLine;
@@ -41,10 +43,12 @@ public class Shell extends CamelCommand {
 
         try (org.jline.shell.Shell shell = org.jline.shell.Shell.builder()
                 .prompt("camel> ")
-                .groups(registry)
+                .groups(registry, new PosixCommandGroup(), new 
InteractiveCommandGroup())
                 .historyFile(history)
                 .historyCommands(true)
                 .helpCommands(true)
+                .scriptCommands(true)
+                .variableCommands(true)
                 .commandHighlighter(true)
                 .variable(LineReader.LIST_MAX, 50)
                 .option(LineReader.Option.GROUP_PERSIST, true)

Reply via email to