[prev in list] [next in list] [prev in thread] [next in thread]
List: bash-bug
Subject: Re: ${1+"$@"} does not generate multiple words if IFS is empty
From: Chet Ramey <chet.ramey () case ! edu>
Date: 2015-12-30 18:21:31
Message-ID: 568420AB.3000406 () case ! edu
[Download RAW message or body]
On 12/29/15 10:40 PM, martijn@inlv.org wrote:
> Bash Version: 4.3
> Patch Level: 42
> Release Status: release
>
> Description:
> The substitution ${1+"$@"} should resolve to "$@" if there is at
> least one parameter -- i.e. one word per parameter. This works fine
> if IFS contains any character or is unset. If IFS is empty, it
> instead resolves to the equivalent of "$*", i.e. a single word
> concatenating all the parameters without a separator. IFS should
> not influence the behaviour of "$@" under any circumstances.
Yes, thanks for the report. This was `re-clarified' in a Posix group
discussion in October 2014 concerning how "$@" should be expanded in
various contexts, including those where field splitting would not be
performed. It will be fixed for the next bash release.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic