You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2025/09/03 20:28:12 UTC
[PR] stop removing backslashes in shell [accumulo]
keith-turner opened a new pull request, #5856:
URL: https://github.com/apache/accumulo/pull/5856
fixes #3367
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] stop removing backslashes in shell [accumulo]
Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner merged PR #5856:
URL: https://github.com/apache/accumulo/pull/5856
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] stop removing backslashes in shell [accumulo]
Posted by "ddanielr (via GitHub)" <gi...@apache.org>.
ddanielr commented on code in PR #5856:
URL: https://github.com/apache/accumulo/pull/5856#discussion_r2320127371
##########
shell/src/main/java/org/apache/accumulo/shell/Shell.java:
##########
@@ -557,8 +558,16 @@ public void execute(final String[] args) throws IOException {
}
}
+ public static class NonEscapeParser extends org.jline.reader.impl.DefaultParser {
+ @Override
+ public boolean isEscapeChar(char ch) {
Review Comment:
We should verify that only the backslash char is affected by this override.
Otherwise disabling all escaping via the option in the builder might be cleaner as the option name is referenced in jline documentation.
`reader.setOption(LineReader.Option.DISABLE_EVENT_EXPANSION, true);`
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] stop removing backslashes in shell [accumulo]
Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on PR #5856:
URL: https://github.com/apache/accumulo/pull/5856#issuecomment-3250676772
Created this as a draft because I am not sure what functionality this might break in jshell. Also this changes shell behavior that has been different since 2.1.0.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] stop removing backslashes in shell [accumulo]
Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on PR #5856:
URL: https://github.com/apache/accumulo/pull/5856#issuecomment-3255690115
Reworked this in commit 82900a9 to make Accumulo look for the jline option and set it.
Test that commit by inserting the following data in jshell.
```
jshell> client.tableOperations().create("test"); var writer=client.createBatchWriter("test"); Mutation m = new Mutation("r1"); m.at().family(new byte[]{'a',0,'b'}).qualifier("q").put("v1"); writer.addMutation(m); writer.close();
```
Then made the following change in accumulo-env.sh
```bash
JAVA_OPTS=(
'-XX:OnOutOfMemoryError=kill -9 %p'
'-XX:-OmitStackTraceInFastThrow'
'-Djava.net.preferIPv4Stack=true'
'-Dorg.jline.reader.props.disable-event-expansion=on'
"-Daccumulo.native.lib.path=${lib}/native"
"${accumulo_initial_opts[@]}"
)
```
After that, ran the shell and jline is no longer removing `\`
```
root@uno> scan -t test -c a\x00b
r1 a\x00b:q [] v1
```
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org