bug-bash
[Top][All Lists]
Advanced

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

Re: *(.*) matches wrongly when dotglob unset


From: Yongzhi Pan
Subject: Re: *(.*) matches wrongly when dotglob unset
Date: Sun, 4 Dec 2011 14:27:29 +0800

As e36freak said, @(.*) does not work also.

I also find *(.*) doesn't match . and .. .

$ diff <(ls -d *(.*)) <(ls -d .*)
0a1,2
> .
> ..

This may not be the expected result, or we need to clarify this in the manual.

On Sat, Dec 3, 2011 at 5:11 AM, Chet Ramey <chet.ramey@case.edu> wrote:
> On 11/29/11 9:53 AM, Yongzhi Pan wrote:
>> Producing the bug:
>>
>> tux@dell:~$ shopt -s extglob
>> tux@dell:~$ shopt -u dotglob
>> tux@dell:~$ ls -d *(.*)
>> ls: cannot access *(.*): No such file or directory
>> tux@dell:~$ touch '*(.*)'
>> tux@dell:~$ ls -d *(.*)
>> *(.*)
>>
>> I think even if dotglob is unset *(.*) should still matches all dotfiles.
>
> Thanks for the report.  This turned into a rather more complicated fix
> than I anticipated.  The fix will be in the next release of bash.
>
> Chet
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                 ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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