Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :cc;
        bh=6MkHK8ViNDLbv50/hQWd1D1zDnme1qypGt/eEYGebsU=;
        b=JK+TfOvnlBdIPav0p13wCYXFs8/0cJrtas/41EOuln6nwDoMbdSJ3iSVpHdvhBVcuN
         XgDXK2qU91nh/vypZQsBTcw074lHtiAjKc1hDgYLKvxXqzuSwCmZ116Q9fUm2UDO0msO
         nGIJA+K3h7rIYrc4ti9J5xU0kuCTt1JaJM95l9nzj0yvwRz3cKEwc6wFVHlk4owoSKOz
         prFrIJODjZAO07UM7OVEukixoT6It0OoM+XotoFe/d0wG2phtJXX7B1eu0fkhMiE17yM
         hlkHIeGr9KehfA5CibuOd+3R9tvXwrq4jQjz8BqXeISZwpyofkYWbGjJQvY8rbQ2SSqz
         z+gA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to:cc;
        bh=6MkHK8ViNDLbv50/hQWd1D1zDnme1qypGt/eEYGebsU=;
        b=X2Xw70knveEiqftI6KAId9TBzqF3iB+yTBvT+dEFMNYsFraj12gO8XsP+FOAbUnVov
         RxBkUGBJN4ssIKMiesxxufYifK5HIy3UfeQuAcrtDqRymFtJObqKB5/4JRJ+0JSIbKUF
         cU24B1m0QS417qwmFFXbXyQXy1Y/dsc3rQSs6rXkUp2PEZZZLi+55bhAWI4Kpo2UC1G3
         FxUG3N3E4qZzPtFQMF9pYQ7A24DRso7qa93XCnJfBR5FsfRvjxTgkqxGG72tZwc0NO9V
         b0vcSHzR0CUQPN6c5LYw4rCxrNkiE2yY2zrROEyBFdqgtyDKdUiNBu0CHd3ie25+vwnj
         gmgg==
X-Gm-Message-State: AOPr4FWCpZh0t5urskB4dyGBWqI4ozFXLMnmRNpcPYw5HeEGHt6IjE/l08SdWc44NY459RG2/seNlpCKji456w==
MIME-Version: 1.0
X-Received: by 10.55.204.6 with SMTP id r6mr4145781qki.21.1460382302776; Mon,
 11 Apr 2016 06:45:02 -0700 (PDT)
In-Reply-To: <20160411133145.486788a5@pwslap01u.europe.root.pri>
References: <CAHYJk3TY5kU0fXDkk2iO7kRJhhMTS1f4a9Am1ueN4wCXOQ7Hsg@mail.gmail.com>
	<160410151105.ZM21544@torch.brasslantern.com>
	<20160411093738.11406966@pwslap01u.europe.root.pri>
	<CAHYJk3SEeghkbpLCE26bG_76nM5PYp9MF68AO1ue00DHTwRV6A@mail.gmail.com>
	<20160411112941.579d8157@pwslap01u.europe.root.pri>
	<CAHYJk3QkC_jDq94ax2vMZUCaU2iELFO7kk49ogQUg-qafDtgPA@mail.gmail.com>
	<20160411120716.06a6d1c9@pwslap01u.europe.root.pri>
	<CAHYJk3Qc8WsRAxav6wT8MmoEKj-hDByAA3ZCWHHbTt=+CaUQxQ@mail.gmail.com>
	<20160411133145.486788a5@pwslap01u.europe.root.pri>
Date: Mon, 11 Apr 2016 15:45:02 +0200
Message-ID: <CAHYJk3TKQx4pB7uKjxwVdU+QQyeJTxo7qj6w0Xibq2V7J_Qsqw@mail.gmail.com>
Subject: Re: Allow slash in alternation patterns in limited cases?
From: Mikael Magnusson <mikachu@gmail.com>
To: Peter Stephenson <p.stephenson@samsung.com>
Cc: zsh workers <zsh-workers@zsh.org>
Content-Type: text/plain; charset=UTF-8
X-Seq: zsh-workers 38276

On Mon, Apr 11, 2016 at 2:31 PM, Peter Stephenson
<p.stephenson@samsung.com> wrote:
> On Mon, 11 Apr 2016 14:06:10 +0200
> Mikael Magnusson <mikachu@gmail.com> wrote:
>
>> On Mon, Apr 11, 2016 at 1:07 PM, Peter Stephenson
>> <p.stephenson@samsung.com> wrote:
>> > The point is that, unlike the ~ case which is just a flag passed in to
>> > the pattern match parser, it would longer done by pattern matching at
>> > all.  It would be done in the glob code.  The pattern match code would
>> > see the foo, bar, baz, bong, and it would it be reassembled higher up.
>> > So it's not so much incompatible as something utterly different.
>>
>> This is already the same difference we have between (foo|bar) in
>> globbing and pattern matching though. If it's a glob, it's handled
>> recursively by scanner() and if it's pattern, it's somewhere else (I
>> don't even know where the general pattern matching code is by heart).
>
> No, expressions like (foo|bar) are *only* handled by the pattern
> matcher.  The scanner's sole responsibility is to tell the pattern
> matcher whether or not it should stop if it sees a "/".

Ah, that explains it :). Thanks.

-- 
Mikael Magnusson

