On Tue, Aug 10, 2010 at 04:15:30PM +0200, Andreas Schwab wrote:
> Greg Wooledge <wool...@eeg.ccf.org> writes:
> 
> > The 4.1 man page says:
> >
> >       ${!prefix*}
> >       ${!pre...@}
> >            Names matching prefix.  Expands to the names of variables whose
> >            names begin with prefix, separated by the first character of the
> >            IFS special variable.  When @ is used and the expansion appears
> >            within double quotes, each variable name expands to a separate
> >            word.

> > Actually, the IFS rule only applies when the "${!prefix*}" is quoted.

> > I believe this is intended behavior (since it matches how $* works),
> > and that the man page is simply misleading.

> Parameter expansion and word splitting are two separate steps.  The
> quote above only talks about the former.

Eh?  The quote mentions the special behavior of the @ version, but not
the special behavior of the * version.

I'd suggest some wording like this:

       ${!prefix*}
       ${!pre...@}
            Names matching prefix.  Expands to the names of variables whose
            names begin with prefix.   When * is used and the expansion
            appears within double quotes, the names are separated by the
            first character of the IFS special variable.  When @ is used
            and the expansion appears within double quotes, each variable
            name expands to a separate word.

Reply via email to