From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20340 invoked by alias); 11 Apr 2016 13:45:08 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 38276 Received: (qmail 8487 invoked from network); 11 Apr 2016 13:45:07 -0000 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: <160410151105.ZM21544@torch.brasslantern.com> <20160411093738.11406966@pwslap01u.europe.root.pri> <20160411112941.579d8157@pwslap01u.europe.root.pri> <20160411120716.06a6d1c9@pwslap01u.europe.root.pri> <20160411133145.486788a5@pwslap01u.europe.root.pri> Date: Mon, 11 Apr 2016 15:45:02 +0200 Message-ID: Subject: Re: Allow slash in alternation patterns in limited cases? From: Mikael Magnusson To: Peter Stephenson Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On Mon, Apr 11, 2016 at 2:31 PM, Peter Stephenson wrote: > On Mon, 11 Apr 2016 14:06:10 +0200 > Mikael Magnusson wrote: > >> On Mon, Apr 11, 2016 at 1:07 PM, Peter Stephenson >> 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