jcommander icon indicating copy to clipboard operation
jcommander copied to clipboard

Escaping paramater content

Open priand opened this issue 2 years ago • 1 comments

I need to pass a parameter that contains some characters that need to be escaped. For example, command 'I'm the \"walrus\"", where the actual parameter value is I'm the "walrus". Is there a way to do this? bash, for example, allow the use of escaped character. See: https://unix.stackexchange.com/questions/30903/how-to-escape-quotes-in-shell. I didn't find anything equivalent in JCommander.

priand avatar May 09 '23 00:05 priand

We cannot see the actual cause of this inside of JCommander. In fact, it is bash itself which is in your way. Bash is parsing the command line, and passes the arguments to JCommander. In that moment, JCommander cannot re-fix the problem.

mkarg avatar Oct 11 '23 17:10 mkarg

@priand As you did not respond to the last comment I assume my claim was correct, so I am closing this ticket now.

mkarg avatar Apr 27 '24 09:04 mkarg