A NOTE has been added to this issue. ====================================================================== https://www.austingroupbugs.net/view.php?id=1955 ====================================================================== Reported By: luna Assigned To: ajosey ====================================================================== Project: 1003.1(2004)/Issue 6 Issue ID: 1955 Category: Shell and Utilities Type: Clarification Requested Severity: Editorial Priority: normal Status: Under Review Name: Luna Organization: User Reference: Section: 2.6.3 Page Number: 2489 Line Number: 80775 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2025-11-10 18:02 UTC Last Modified: 2025-11-10 20:55 UTC ====================================================================== Summary: Behaviour is unclear when a parameter expands to another valid expansion ======================================================================
---------------------------------------------------------------------- (0007308) stephane (reporter) - 2025-11-10 20:55 https://www.austingroupbugs.net/view.php?id=1955#c7308 ---------------------------------------------------------------------- From https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/utilities/V3_chap02.html#tag_19_06 <<< 2.6 Word Expansions This section describes the various expansions that are performed on words. Not all expansions are performed on every word, as explained in the following sections and elsewhere in this chapter. The expansions that are performed for a given word shall be performed in the following order: 1. Tilde expansion (see 2.6.1 Tilde Expansion), parameter expansion (see 2.6.2 Parameter Expansion), command substitution (see 2.6.3 Command Substitution ), and arithmetic expansion (see 2.6.4 Arithmetic Expansion) shall be performed, beginning to end. See item 5 in 2.3 Token Recognition. 2. Field splitting (see 2.6.5 Field Splitting) shall be performed on the portions of the fields generated by step 1. 3. Pathname expansion (see 2.6.6 Pathname Expansion) shall be performed, unless set -f is in effect. 4. Quote removal (see 2.6.7 Quote Removal), if performed, shall always be performed last. >>> "Following order" here is 1, then 2, then 3, then 4. Within 1 they're *all* done "beginning to end". There's a reference to "token recognition" but nothing that would suggest that those 4 parts in step 1 would be done one after the other with another round of token recognition on the result in-between each (which anyway wouldn't make sense as those could yield tokens that have already been processed in previous steps). Issue History Date Modified Username Field Change ====================================================================== 2025-11-10 18:02 luna New Issue 2025-11-10 18:02 luna Status New => Under Review 2025-11-10 18:02 luna Assigned To => ajosey 2025-11-10 18:42 luna Note Added: 0007305 2025-11-10 18:51 calestyo Note Added: 0007306 2025-11-10 18:57 luna Note Added: 0007307 2025-11-10 20:55 stephane Note Added: 0007308 ======================================================================
