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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 3f9278c848d6 camel-jbang - Show 'Camel' instead of 
'PicocliCommandRegistry' in shell completions (#23911)
3f9278c848d6 is described below

commit 3f9278c848d62816170a4152f8ef35a67e8c3ef0
Author: Guillaume Nodet <[email protected]>
AuthorDate: Wed Jun 10 19:37:53 2026 +0200

    camel-jbang - Show 'Camel' instead of 'PicocliCommandRegistry' in shell 
completions (#23911)
    
    Override PicocliCommandRegistry.name() to return "Camel" so the
    completion group header shows a meaningful name.
    
    TODO: replace with constructor parameter when JLine merges jline/jline3#1947
    
    Co-authored-by: Claude Opus 4.6 <[email protected]>
---
 .../main/java/org/apache/camel/dsl/jbang/core/commands/Shell.java | 8 +++++++-
 .../org/apache/camel/dsl/jbang/core/commands/tui/ShellPanel.java  | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

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 b0bad786cc8f..5d8a3e0b7ba7 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
@@ -57,7 +57,13 @@ public class Shell extends CamelCommand {
 
     @Override
     public Integer doCall() throws Exception {
-        PicocliCommandRegistry registry = new 
PicocliCommandRegistry(CamelJBangMain.getCommandLine());
+        // TODO: replace with new PicocliCommandRegistry(commandLine, "Camel") 
when JLine merges #1947
+        PicocliCommandRegistry registry = new 
PicocliCommandRegistry(CamelJBangMain.getCommandLine()) {
+            @Override
+            public String name() {
+                return "Camel";
+            }
+        };
 
         String homeDir = HomeHelper.resolveHomeDir();
         Path history = Paths.get(homeDir, ".camel-jbang-history");
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ShellPanel.java
 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ShellPanel.java
index b3d1f4d0dd37..6593620512e8 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ShellPanel.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ShellPanel.java
@@ -349,7 +349,13 @@ class ShellPanel {
 
     private void runShell(LineDisciplineTerminal terminal) {
         try {
-            PicocliCommandRegistry registry = new 
PicocliCommandRegistry(CamelJBangMain.getCommandLine());
+            // TODO: replace with new PicocliCommandRegistry(commandLine, 
"Camel") when JLine merges #1947
+            PicocliCommandRegistry registry = new 
PicocliCommandRegistry(CamelJBangMain.getCommandLine()) {
+                @Override
+                public String name() {
+                    return "Camel";
+                }
+            };
             String camelVersion = VersionHelper.extractCamelVersion();
 
             // Redirect command output (printer()) through the virtual terminal

Reply via email to