cbeust / jcommander

Command line parsing framework for Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Escaping paramater content

priand opened this issue · 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.

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.

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