[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: wildcard authz docs question

From: Doug Robinson <doug.robinson_at_wandisco.com>
Date: Tue, 21 Mar 2017 11:40:50 -0400

Daniel:

The shell's all treat ** as * and require that it match something. So
"mkdir -p foo/bar/baz" would match.

I would expect "/*/**/*", "/**/*/*" and "/*/*/**" to all match exactly the
same sets of components.

No command shell that I know of (sh,bash,zsh,tcsh,csh,ksh) has a
moral equivalent to "zero or more path components". Perl, python,
et. al. do.

Cheers,

Doug

On Wed, Mar 15, 2017 at 5:55 AM, Daniel Shahaf <d.s_at_daniel.shahaf.name>
wrote:

> From the 1.10 draft release notes:
>
> > All wildcards apply to full path segments only, i.e. * never matches
> > /, except for the case where /**/ matches zero or more path segments.
> > For example, /*/**/* will match any path which contains at least
> > 2 segments and is equivalent to /**/*/* as well as /*/*/**.
>
> Are «/*/**/*» «/**/*/*» «/*/*/**» really equivalent? I would have
> expected the first two to match any node except / and /'s immediate
> children, but I wouldn't expect the third form to match /trunk/iota
> where iota is a file, since the pattern has a trailing slash after the
> non-optional second component.
>
> Testing this in
> cd $(mktemp -d)
> mkdir -p foo/bar
> , I see that neither vim nor zsh finds any matches for */*/**, meaning
> they don't interpret ** as "zero or more" path components in this
> pattern. I suppose they only treat ** in this way when it appears with
> slashes immediately before and after it.
>
> Cheers,
>
> Daniel
>

-- 
*DOUGLAS B. ROBINSON* SENIOR PRODUCT MANAGER
*T *925-396-1125
*E* doug.robinson_at_wandisco.com
*www.wandisco.com <http://www.wandisco.com/>*
-- 
Learn how WANdisco Fusion solves Hadoop data protection and scalability 
challenges <http://www.wandisco.com/hadoop/wd-fusion>
Listed on the London Stock Exchange: WAND 
<http://www.bloomberg.com/quote/WAND:LN>
THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY, AND MAY BE 
PRIVILEGED.  If this message was misdirected, WANdisco, Inc. and its 
subsidiaries, ("WANdisco") does not waive any confidentiality or privilege. 
 If you are not the intended recipient, please notify us immediately and 
destroy the message without disclosing its contents to anyone.  Any 
distribution, use or copying of this e-mail or the information it contains 
by other than an intended recipient is unauthorized.  The views and 
opinions expressed in this e-mail message are the author's own and may not 
reflect the views and opinions of WANdisco, unless the author is authorized 
by WANdisco to express such views or opinions on its behalf.  All email 
sent to or from this address is subject to electronic storage and review by 
WANdisco.  Although WANdisco operates anti-virus programs, it does not 
accept responsibility for any damage whatsoever caused by viruses being 
passed.
Received on 2017-03-21 16:41:06 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.