From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22455 invoked by alias); 11 Apr 2016 12:42:00 -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: 38274 Received: (qmail 22339 invoked from network); 11 Apr 2016 12:41:56 -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 autolearn=ham autolearn_force=no version=3.4.1 X-AuditID: cbfec7f4-f796c6d000001486-12-570b99343bab Date: Mon, 11 Apr 2016 13:31:45 +0100 From: Peter Stephenson To: zsh workers Subject: Re: Allow slash in alternation patterns in limited cases? Message-id: <20160411133145.486788a5@pwslap01u.europe.root.pri> In-reply-to: References: <160410151105.ZM21544@torch.brasslantern.com> <20160411093738.11406966@pwslap01u.europe.root.pri> <20160411112941.579d8157@pwslap01u.europe.root.pri> <20160411120716.06a6d1c9@pwslap01u.europe.root.pri> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsVy+t/xq7omM7nDDdo6lC0ONj9kcmD0WHXw A1MAYxSXTUpqTmZZapG+XQJXxsq7C5gKOjkqFt7byNLAuJWti5GTQ0LARGLynKWMELaYxIV7 64HiXBxCAksZJfqvd7KDJIQEZjBJ7F5oD5E4xyhx4WEHO4RzllHiwIlNYKNYBFQlzr5YwwRi swkYSkzdNBtsrAhQvPn7PxYQW1jASeLVw7NA9RwcvAL2EgffpYGEOQWCJRpv3oLa/JNZ4v3r C6wgCX4BfYmrfz8xQZxnLzHzyhmwmbwCghI/Jt8Dm8ksoCWxeVsTK4QtL7F5zVtmiKvVJW7c 3c0+gVF4FpKWWUhaZiFpWcDIvIpRNLU0uaA4KT3XUK84Mbe4NC9dLzk/dxMjJJy/7GBcfMzq EKMAB6MSD6/DNa5wIdbEsuLK3EOMEhzMSiK81jO4w4V4UxIrq1KL8uOLSnNSiw8xSnOwKInz zt31PkRIID2xJDU7NbUgtQgmy8TBKdXAyFbnkTmpUK21yn5b4ILkuzM8j6rlbJj27qyjWkDL tWJ7/ozJ3e/l4if3slzqn+FzccrauCThNLN+I30mweOSs7Knz0tYUfL+b3StUkXKFu+iHCmv FUuVj3rU1v1dfIGPW/dGk7LxQtd2+XWXT2nv0J8iVCRY77bwh0Qk+523MflrN+SEnj6nxFKc kWioxVxUnAgA1LG192MCAAA= 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 till the pattern matcher whether or not it should stop if it sees a "/". pws