The following issue has been SUBMITTED. ====================================================================== https://www.austingroupbugs.net/view.php?id=1596 ====================================================================== Reported By: McDutchie Assigned To: ====================================================================== Project: 1003.1(2016/18)/Issue7+TC2 Issue ID: 1596 Category: Shell and Utilities Type: Clarification Requested Severity: Objection Priority: normal Status: New Name: Martijn Dekker Organization: https://github.com/ksh93/ksh User Reference: Section: XCU 2.6 Page Number: 2319 Line Number: 74745-74746 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2022-08-03 19:18 UTC Last Modified: 2022-08-03 19:18 UTC ====================================================================== Summary: Not one, but three expansions may create multiple fields from a single word Description: Quoting lines 74743-74746: "It is only field splitting or pathname expansion that can create multiple fields from a single word. The single exception to this rule is the expansion of the special parameter '@' within double-quotes, as described in Section 2.5.2."
The last sentence is not correct. An argument that consists of an unquoted $@ or $* both initially generates one field per positional parameter. Each word is then subject to pathname expansion, field splitting and empty removal. The former two can be disabled (using `set -f` and `IFS=` respectively) but that does not cause $@ or $* to generate just one field. Proof: $ (set -f; IFS=; set one two '' three; printf '@%s\n' $@; printf '*%s\n' $*) @one @two @three *one *two *three Desired Action: Replace by: "It is only field splitting or pathname expansion that can create multiple fields from a single word. However, as a special exception to this rule, the expansion of the special parameter '@' within double-quotes, as well as the expansion of the unquoted special parameters '@' or '*', may generate multiple fields as described in Section 2.5.2." ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2022-08-03 19:18 McDutchie New Issue 2022-08-03 19:18 McDutchie Name => Martijn Dekker 2022-08-03 19:18 McDutchie Organization => https://github.com/ksh93/ksh 2022-08-03 19:18 McDutchie Section => XCU 2.6 2022-08-03 19:18 McDutchie Page Number => 2319 2022-08-03 19:18 McDutchie Line Number => 74745-74746 ======================================================================