bug-bash
[Top][All Lists]
Advanced

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

Re: bash "extglob" needs to upgrade at least like zsh "kshglob"


From: Chet Ramey
Subject: Re: bash "extglob" needs to upgrade at least like zsh "kshglob"
Date: Thu, 3 Nov 2022 15:24:44 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.0

On 10/29/22 1:50 AM, Martin D Kealey wrote:

PS: While we're about it, can we please fix the expansion of « a/*/b/c/d/*
» so it only calls readdir on a/ and each dir matching a/*/b/c/d/ and NOT
call readdir on dirs matching a/*/, a/*/b/, or a/*/b/c/.

It already does this.

Given

$ find . -print
.
./a
./a/z
./a/z/b
./a/z/b/c
./a/x
./a/x/b
./a/x/b/c
./a/x/b/c/d
./a/x/b/c/d/1
./a/x/b/c/d/4
./a/x/b/c/d/3
./a/x/b/c/d/2
./a/x/b/c/d/5
./a/y
./a/y/b

Running `echo a/*/b/c/d/*' calls opendir(2) twice:

$ ./bash ./x1
opendir: a/
opendir: a/x/b/c/d
a/x/b/c/d/1 a/x/b/c/d/2 a/x/b/c/d/3 a/x/b/c/d/4 a/x/b/c/d/5


--
``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]