bug-bash
[Top][All Lists]
Advanced

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

Re: dot gob+extglob bug


From: Chet Ramey
Subject: Re: dot gob+extglob bug
Date: Fri, 20 Jun 2014 15:38:17 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 6/19/14, 6:47 PM, Ian Kelling wrote:

> The doc says "When matching a pathname, the slash character
> must always be matched explicitly."  Shortly thereafter, in the next
> paragraph of the same section, GLOBIGNORE is described, which does not
> treat / as special, but this is not mentioned, and is very unexpected to
> me. Closer inspection, I see same language "filenames matching a
> pattern" is used in both paragraphs, so I think some clarification is
> needed.

The GLOBIGNORE matching code treats the patterns and strings to be matched
as pathnames, and treats `/' specially (that is, it specifies FNM_PATHNAME
to bash's internal version of fnmatch).  If *a matches scratch/a, for
example, that's a bug in the matching code I will have to identify and fix.
None of `*', `?', or bracket expressions should match a slash.

> And then, another bug or doc clarification. The various [:class:] forms
> don't seem to work at all in GLOBIGNORE.

Yeah, this is a different problem caused by an oversight.  The colon in the
bracket expression is being treated as a pattern delimiter.  I've appended
a patch that fixes this problem.

Chet


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

Attachment: pathexp-globignore-delim.patch
Description: Text Data


reply via email to

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