[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: extglob patterns and dotfiles
From: |
Eric Cook |
Subject: |
Re: extglob patterns and dotfiles |
Date: |
Tue, 2 Jan 2018 14:53:28 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
On 01/02/2018 10:30 AM, Chet Ramey wrote:
> On 12/31/17 10:36 PM, Eric Cook wrote:
>
>> So to make my request more specific, i don't think the extglob !() should
>> match dotfiles when one of the patterns in the list is preceded with an
>> period.
>> to be more ksh93-like.
>
> Let's see if we can be more precise: if a filename beginning with a `.'
> does not match any of the patterns in a !(...) list, don't return it as
> a match if the leading dot has to be explicitly matched.
>
> Chet
>
That sounds right, i personally thought (and i could be wrong) of !()
like `*', but excluding anything matching the patterns inside.
so without dotglob enabled or being prefixed with ., !() would
not match dotfiles.