| Summary: | hush parsing of ${1+"$@"} | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Christian Häggström <christian.haggstrom> |
| Component: | Standard Compliance | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.19.x | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: | adds test for ${1+"$@"} | ||
|
Description
Christian Häggström
2011-09-23 10:24:09 UTC
This is sheer insanity. Bash is buggy wrt """$@", therefore we'll use ambiguous constructs ${1+"$@"}?
Where is the definitive part of the standard which says what exactly should happen with ${1+"$@"} construct?
(In reply to comment #1) i think it breaks down into two parts. there's: ${1+word} which, if $1 is set, substitutes the words then there's "$@" which expands the array of words. so it should be: $ set -- '1 2' 3 4 $ printf '%s\n' "$@" 1 2 3 4 you could e-mail austin-group-l@opengroup.org for an interpretation ... i'm sure someone will be able to get the details for you Fixed in git. |