The following issue has been SUBMITTED. ====================================================================== https://austingroupbugs.net/view.php?id=1852 ====================================================================== Reported By: steffen Assigned To: ====================================================================== Project: 1003.1(2024)/Issue8 Issue ID: 1852 Category: Shell and Utilities Type: Clarification Requested Severity: Editorial Priority: normal Status: New Name: steffen Organization: User Reference: Section: 2.52 Page Number: 2479 Line Number: 80376 ff. Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2024-08-14 23:38 UTC Last Modified: 2024-08-14 23:38 UTC ====================================================================== Summary: Clarify "$@[:$@:]" (with $# -eq 0) Description: ..where [::] means repetition, aka "$@$@$@" etc. The standard says
80376 unspecified. If there are no positional parameters, the expansion of '@' shall generate zero 80377 fields, even when '@' is within double-quotes; however, if the expansion is embedded 80378 within a word which contains one or more other parts that expand to a quoted null string, 80379 these null string(s) shall still produce an empty field, except that if the other parts are all 80380 within the same double-quotes as the '@', it is unspecified whether the result is zero fields 80381 or one empty field. In a test file one() { echo "$# 1<$1>"; } two() { one "$@"; } twox() { one "$@$@"; } two two x twox twox x shells will give different results for the argument-less call to twox(). (Here on my box bash(1) is the only one which expands "$@$@" to nothing.) Desired Action: Please add wording that covers successive "empty field" expansions. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2024-08-14 23:38 steffen New Issue 2024-08-14 23:38 steffen Name => steffen 2024-08-14 23:38 steffen Section => 2.52 2024-08-14 23:38 steffen Page Number => 2479 2024-08-14 23:38 steffen Line Number => 80376 ff. ======================================================================