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.ra...@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    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to