Support nested quoting
See original GitHub issueAs an enhancement to https://github.com/remkop/picocli/issues/594, we can support nested quotes.
For example, when splitting on the ","
split regex, with a Map
option whose keys have embedded '='
characters, we want to be able to parse input like this:
<cmd> --option "'keyprefix=keypostfix'=value","'key2=key2'=value2"
Giving a map with key-value pairs like this:
keyprefix=keypostfix : value
key2=key2 : value2
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Quick Tip: Nested Quotations - WhiteSmoke
Use single quotes for a nested quotation, when someone repeats what someone else said. Joe smiled and said, "Jenny said 'yes' when I...
Read more >Nested quotation - Wikipedia
A nested quotation is a quotation that is encapsulated inside another quotation, forming a hierarchy with multiple levels. When focusing on a certain ......
Read more >How does bash deal with nested quotes? - Stack Overflow
You cannot nest single quotes within single quotes. You can nest double quotes within double quotes by escaping them though.
Read more >Nested Quotation Marks - HCL Informix documentation
A nested collection is a collection that is the element type for another collection. Whenever you nest collection literals, use nested quotation marks....
Read more >nested double quotes in assignment with command substitution
Once one is inside $(...) , quoting starts all over from scratch. In other words, "..." and $(...) can nest within each other....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, probably. As I said, it’s not an issue with picocli.
Adding this ticket to the 4.0 roadmap:
As part of the work for #738, picocli 4.0 will fully support nested backslash-escaped double quotes. Single quotes will not have any special meaning.