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: Oğuz
Subject: Re: bash "extglob" needs to upgrade at least like zsh "kshglob"
Date: Mon, 31 Oct 2022 05:00:40 +0200

31 Ekim 2022 Pazartesi tarihinde Martin D Kealey <martin@kurahaupo.gen.nz>
yazdı:
>
> With the exception of the !(LIST) negation, there's a direct
> correspondence between extglob and any other regex format. Translating
> between them is trivial.
>
If we use the standard POSIX BRE or ERE, then there's no additional code to
> ship; it's included as part of the OS. The hard part is what to do with
> (!LIST), which was the point of my previous post.
>

That'd be clunkier than what we already have. Bash targets many platforms
and it'd have to target as many regex engines if it were to translate
extglobs to posix regexes. You can't expect all of them to be compatible
with each other, and they are not. So, if we wish to translate extglobs to
regexes and have them work regardless of the platform, the easiest way
forward is to adopt a third party regex engine; about which I said enough
in my previous email.

The problem is that it DOESN'T work fine. In practice people encounter
> abysmally slow extglob matching.
>

*when matching against a huge string. Which is rare in my experience, but
of course should be taken into consideration if there are multiple bug
reports; I didn't say anything against that.


-- 
Oğuz


reply via email to

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