The following issue has been SUBMITTED. ====================================================================== http://austingroupbugs.net/view.php?id=1268 ====================================================================== Reported By: geoffclare Assigned To: ====================================================================== Project: 1003.1(2016)/Issue7+TC2 Issue ID: 1268 Category: Shell and Utilities Type: Error Severity: Objection Priority: normal Status: New Name: Geoff Clare Organization: The Open Group User Reference: Section: 2.6.2, 2.6.3 Page Number: 2354, 2358 Line Number: 75056, 75206 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2019-07-05 09:34 UTC Last Modified: 2019-07-05 09:34 UTC ====================================================================== Summary: Expansions in double-quotes Description: A discussion on the mailing list identified a number of issues with the way the effect of double-quotes on expansions within them is specified. Specifically, 2.6.2 says:<blockquote>If a parameter expansion occurs inside double-quotes:
* Pathname expansion shall not be performed on the results of the expansion. * Field splitting shall not be performed on the results of the expansion.</blockquote> This has the following problems: 1. It is misleading to say "pathname expansion shall not be performed". Although this is effectively true if the entire pattern is inside double-quotes, if only part of it is quoted then pathname expansion is performed but the part inside the double-quotes is treated as a literal string. 2. It omits mention of how pattern matching in case statements and in the four string-manipulation forms of parameter expansion are affected. 3. The statement about field splitting is redundant because 2.6.5 says "the shell shall scan the results of expansions and substitutions that did not occur in double-quotes for field splitting". A similar statement in 2.6.3 has the same problems. The best way to fix these issues would be to add a statement to 2.2.3 that applies to all expansions within double-quotes and remove the statements from 2.6.2 and 2.6.3. Desired Action: On page 2347 line 74738 section 2.2.3, add a new paragraph after the list:<blockquote>When double-quotes are used to quote a parameter expansion, command substitution, or arithmetic expansion, the literal value of all characters within the result of the expansion shall be preserved.</blockquote> On page 2354 line 75056 section 2.6.2, delete:<blockquote>If a parameter expansion occurs inside double-quotes:<ul><li>Pathname expansion shall not be performed on the results of the expansion.</li><li>Field splitting shall not be performed on the results of the expansion.</li></ul></blockquote> On page 2358 line 75206 section 2.6.3, delete:<blockquote>If a command substitution occurs inside double-quotes, field splitting and pathname expansion shall not be performed on the results of the substitution.</blockquote> ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2019-07-05 09:34 geoffclare New Issue 2019-07-05 09:34 geoffclare Name => Geoff Clare 2019-07-05 09:34 geoffclare Organization => The Open Group 2019-07-05 09:34 geoffclare Section => 2.6.2, 2.6.3 2019-07-05 09:34 geoffclare Page Number => 2354, 2358 2019-07-05 09:34 geoffclare Line Number => 75056, 75206 2019-07-05 09:34 geoffclare Interp Status => --- ======================================================================
