Re: ${1+"$@"} does not generate multiple words if IFS is empty

2015-12-30 Thread Andreas Schwab
mart...@inlv.org writes: > 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

Re: ${1+"$@"} does not generate multiple words if IFS is empty

2015-12-30 Thread Greg Wooledge
On Wed, Dec 30, 2015 at 10:02:41AM +0100, Andreas Schwab wrote: > mart...@inlv.org writes: > > > 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 IF

Re: ${1+"$@"} does not generate multiple words if IFS is empty

2015-12-30 Thread Chet Ramey
On 12/29/15 10:40 PM, mart...@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 contain

${1+"$@"} does not generate multiple words if IFS is empty

2015-12-30 Thread martijn
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: darwin11.4.2 Compiler: /usr/bin/clang Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='darwin11.4.2' -DCONF_MACHTYPE='x86_64-apple-darwin11.4.2' -DCONF_VENDOR='apple' -DLOCALEDIR='