commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Csaba Skrabak (JIRA)" <>
Subject [jira] [Commented] (CLI-275) Cannot get a full quoted argument through
Date Wed, 23 Aug 2017 15:48:00 GMT


Csaba Skrabak commented on CLI-275:

[~glennm], your 4th example:
{noformat} fully interpreted by bash, thet is why echo behaves the same way. Bash by the way interprets
it the following way:
1. Double quotation mark: quoted string starts (first one.)
2. Single quotation mark: a literal apostrophe is passed over to the process since we are
inside quotation.
3. Double quotation mark: first quoted string ends here.
4. Tilde. Has no special meaning, passing it over to the process.
5. Double quotation mark. Starting a quoted string again. This is a second quotation.
6. Single quotation mark. A literal apostrophe is passed over to the process since we are
inside (the second) quotation.
7. Double quotation mark. End of the second quotation.
8. End. So as a result, we passed over an apostrophe in step 2, a tilde in step 4 and another
apostrophe in step 6:

> Cannot get a full quoted argument through
> -----------------------------------------
>                 Key: CLI-275
>                 URL:
>             Project: Commons CLI
>          Issue Type: Bug
>            Reporter: Csaba Skrabak
> CLI-185 has been partially fixed but user still cannot pass in an argument like "x" (the
whole argument surrounded by one pair of double quotes.) If user enters \"x\" then the quotes
get eaten (btw. WHY THE HECK?!). But if user enters \"\"x\"\" then both pairs of quotes are
left intact.
> The idea of removing the quotes is plain wrong, should be either forgotten entirely or
the argument should be parsed properly (rather than tinkering from bug to bug with variations
of find/substring call constructs) with the possibility to escape and quote quotation marks.
> Blocks: PHOENIX-3710

This message was sent by Atlassian JIRA

View raw message