bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Document that here strings don't support brace expansion.


From: Chet Ramey
Subject: Re: Document that here strings don't support brace expansion.
Date: Tue, 14 Mar 2023 14:04:28 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

On 3/14/23 11:23 AM, Dale R. Worley wrote:
Alex Bochannek <alex@bochannek.com> writes:
"The WORD undergoes tilde expansion, parameter and variable expansion,
command substitution, arithmetic expansion, and quote removal.  Filename
expansion and word splitting are not performed."

It is missing brace expansion, which is not supported:

Interesting ... I would recommend adding brace expansion to the list of
things-not-done because I think it's a common cognitive error to include
brace expansion as part of filename expansion -- it's one of those
things you do on the command line to generate a list of the files you
want.

OK, let's assume that's true: that brace expansion and filename expansion
are linked in your mind. Some glob(3) implementations do include it as a
non-standard extension, in fact.

If they're linked, why wouldn't saying filename generation isn't performed
be enough to imply that brace expansion isn't performed either?

I mean, it's not a huge deal -- two words. What I want to avoid is the
expectation that not only does the documentation need to specify which
expansions are performed, but the ones that are not. How about assuming
that if it's not specified as being performed, it's not performed?

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]