This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: wordexp IFS fixes
- To: Tim Waugh <tim@cyberelk.demon.co.uk>
- Subject: Re: wordexp IFS fixes
- From: Ulrich Drepper <drepper@cygnus.com>
- Date: 06 Sep 1998 11:03:53 -0700
- Cc: libc-hacker@cygnus.com
- References: <Pine.LNX.4.00.9809032023140.8377-100000@cyberelk.elk.co.uk>
- Reply-To: drepper@cygnus.com (Ulrich Drepper)
Tim Waugh <tim@cyberelk.demon.co.uk> writes:
> I've fixed a couple of bugs in wordexp to do with IFS handling, and added
> the relevant tests.
Thanks, it's in.
> There's another case I'd like to add a test for, but I'm not quite sure
> what the outcome should be!
>
> If IFS=':', how many words would you expect ":abc:" to expand to?
> wordexp currently says 1 ("abc"), which is certainly wrong; bash seems to
> say 2 ("" and "abc"), and the spec (or what I have of it) would seem to
> say 3 ("", "abc", and ""). I expect that I've misread the spec..
We don't have many comparisons available. All systems I've tried
(Solaris, DU, Irix) completely fail to recognize IFS. Loosers.
I agree with you that the solution with 3 entries is the right one and
we should implement this even though bash does it differently. And
Chet should get a bug report for bash.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------