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 autolearn=ham
	autolearn_force=no version=3.4.1
X-AuditID: cbfec7f4-f796c6d000001486-b6-570b62549dfa
Date: Mon, 11 Apr 2016 09:37:38 +0100
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: Allow slash in alternation patterns in limited cases?
Message-id: <20160411093738.11406966@pwslap01u.europe.root.pri>
In-reply-to: <160410151105.ZM21544@torch.brasslantern.com>
References:
 <CAHYJk3TY5kU0fXDkk2iO7kRJhhMTS1f4a9Am1ueN4wCXOQ7Hsg@mail.gmail.com>
 <160410151105.ZM21544@torch.brasslantern.com>
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/xq7ohSdzhBs0LdS0ONj9kcmD0WHXw
	A1MAYxSXTUpqTmZZapG+XQJXxoSXTawFT9krFrxcz9zAOJeti5GTQ0LARGL1m1ZmCFtM4sK9
	9UBxLg4hgaWMErvWtrCAJIQEZjBJnL+eDGGfY5Q4vbwQougso8S6NYcZQRIsAqoSZ08uBJvK
	JmAoMXXTbLC4CFC8+fs/sEHCAk4Srx6eBavhFbCXmNkEEecUsJJY9XwmC8TQJkaJtRubwZr5
	BfQlrv79xARxHlDDlTOMEM2CEj8m3wNrZhbQkti8rYkVwpaX2LzmLTPEpeoSN+7uZp/AKDwL
	ScssJC2zkLQsYGRexSiaWppcUJyUnmuoV5yYW1yal66XnJ+7iRESzl92MC4+ZnWIUYCDUYmH
	1+EaV7gQa2JZcWXuIUYJDmYlEd5t8dzhQrwpiZVVqUX58UWlOanFhxilOViUxHnn7nofIiSQ
	nliSmp2aWpBaBJNl4uCUamBc8kKe9azApfIZwgZW0zLn+l3RFLJR/ySdfNtk+nKba5+VSk0k
	1WslHki/lioQtjIp43ngZCG7y/7s25vrH8+7+7uvIOXrwsJHXMt1bFZc2O7M58DVpP3UoHfz
	l0trVwW+WLewSa9MVe3R3lMXxV9v4v/w1jfvSKuWcv+jRzd27mGU7NgX9UdKiaU4I9FQi7mo
	OBEAsLjaUWMCAAA=
X-Seq: zsh-workers 38268

On Sun, 10 Apr 2016 15:11:05 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:

> On Apr 10, 10:36pm, Mikael Magnusson wrote:
> }
> } /path/(to/file|or/another/file) # nope, too hard
> } (/path/to/a/dir/*|/path/to/some/other/files/*) # can we allow this?
> 
> My gut feeling is that this is close to impossible.

The problem's not the parsing, it's the fact that you don't have
appropriate chunks corresponding to directories for the scanner to loop
over once pattern matching has parsed it.

The only way I can see is effectively to parse it first in the globbing
code to treat a complete set of parentheses specially.  But this is
going to be inconsistent with pattern matching one way or another.  So a
different syntax would be more sensible.

> } If not, would it be possible to invent some new syntax to "paste" two
> } or more globs together so that a single set of glob
> } quals/sorts/flags/subscripts could apply to it?

I think Bart's answered this.

pws

