[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] '.' causes wildcard expansion
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: [PATCH] '.' causes wildcard expansion |
Date: |
Mon, 18 Jun 2012 13:03:15 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120510 Icedove/10.0.4 |
On 14.06.2012 00:42, Robert Mabee wrote:
> Having second thoughts. Where I suggested taking out this call
>
>> - else if (isregexop (ch))
>> + else if (ch == '*') /* only wildcard currently implemented */
> I should have just taken the extraneous '.' out of isregexop.
It's used in other contexts as "needing escaping". So no, this part is fine
> That would
> make it slightly simpler to add the remaining shell wildcards ('?' and '[')
> when desired.
>
> '[' already works,
Not properly: try a[b*
> if there's also a * to trigger expansion, with the small
> bug that special chars within [] still get escaped or translated so the set
> may include an unexpected '.' or '\'.
>
> Other regex chars also work, which probably should be counted as a
> bug. I assume the eventual goal is to behave just like a common shell.
Please try attached patch
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
regex.diff
Description: Text Data
signature.asc
Description: OpenPGP digital signature