Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: get off my case



On Thu, May 21, 2015 at 10:54 AM, Peter Stephenson
<p.stephenson@xxxxxxxxxxx> wrote:
> On closer examination, it turns out the previous "case" featurama could
> be divided cleanly (if that's an appropriate word in this context) into
> two parts.
>
> First, there was code to handle sh-style parenthesis handling, what you
> get when you set SH_GLOB, by sticking words back together with a "|" and
> treating the result as a single pattern.  This is now redundant with the
> alternations being handled separately.  So sh-style cases can be left
> alone and continue to work properly without having to force initial
> parentheses to match singly with SH_GLOB off.
>
> Second, there was code to handle zsh patterns when a fully parenthesised
> expression turned up with SH_GLOB off.  This is where the hackfest on
> the internal whitespace took place.  This part is still needed to
> reconcile the two worlds when we revert to only matching separate
> opening parentheses in the SH_GLOB case.  However, it can be resurrected
> without damage to the other part.
>
> Note there are no further changes to wordcode here.
>
> Case solved.

I can confirm that zcompile of the distributed functions succeeds now,
as well as my own functions.

> diff --git a/Src/lex.c b/Src/lex.c
> index 87b0cd3..841fb0b 100644
> --- a/Src/lex.c
> +++ b/Src/lex.c
> +        *   "case" patten, either because there's no opening

pattern

> +        *   unfortunately too difficult to comine traditional

combine

-- 
Mikael Magnusson
http://mika.l3ib.org/tmp/2015-05-21-112239.png



Messages sorted by: Reverse Date, Date, Thread, Author