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

kturner pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new 7340efa352 stop removing backslashes in shell (#5856)
7340efa352 is described below

commit 7340efa3524464471b4a972445a7c78a72121781
Author: Keith Turner <[email protected]>
AuthorDate: Fri Sep 5 14:23:56 2025 -0400

    stop removing backslashes in shell (#5856)
    
    
    fixes #3367
---
 shell/src/main/java/org/apache/accumulo/shell/Shell.java | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/shell/src/main/java/org/apache/accumulo/shell/Shell.java 
b/shell/src/main/java/org/apache/accumulo/shell/Shell.java
index b854971219..cc214efe23 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/Shell.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/Shell.java
@@ -310,7 +310,7 @@ public class Shell extends ShellOptions implements 
KeywordExecutable {
           
TerminalBuilder.builder().jansi(false).systemOutput(SystemOutput.SysOut).build();
     }
     if (this.reader == null) {
-      this.reader = 
LineReaderBuilder.builder().terminal(this.terminal).build();
+      this.reader = newLineReaderBuilder().terminal(this.terminal).build();
     }
     this.writer = this.terminal.writer();
 
@@ -557,8 +557,17 @@ public class Shell extends ShellOptions implements 
KeywordExecutable {
     }
   }
 
+  private static LineReaderBuilder newLineReaderBuilder() {
+    var builder = LineReaderBuilder.builder();
+    // workaround for https://github.com/jline/jline3/pull/1413
+    if 
("on".equals(System.getProperty("org.jline.reader.props.disable-event-expansion")))
 {
+      builder.option(LineReader.Option.DISABLE_EVENT_EXPANSION, true);
+    }
+    return builder;
+  }
+
   public static void main(String[] args) throws IOException {
-    LineReader reader = LineReaderBuilder.builder().build();
+    LineReader reader = newLineReaderBuilder().build();
     new Shell(reader).execute(args);
   }
 

Reply via email to