Subject: Re: CVS commit: src/bin/sh
To: David Laight <dsl@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: source-changes
Date: 03/19/2005 16:54:15
On Sat, Mar 19, 2005 at 04:38:27PM +0000, David Laight wrote:
>
> Modified Files:
> src/bin/sh: expand.c
>
> Log Message:
> Check quoting before merging ifs regions.
> sh -c 'set -- a; x="b c"; set -- "$@"$x'
> now correctly gives $1=ab, $2=c
That was the wrong comment (that one applies to rev 1.69, and is arguable
better than the one I used).
1.70 needs:
Don't generate empty trailing arguments when field-splitting
a string that ends with non-whitespace IFS.
sh -c 'IFS=":"; set -- x$IFS; echo $#'
now correctly returns 1.
NetBSD's /bin/sh now passes all the IFS tests in:
http://www.research.att.com/~gsf/public/ifs.sh
David
--
David Laight: david@l8s.co.uk