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,T_DKIM_INVALID
	autolearn=ham autolearn_force=no version=3.4.1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;
        h=from:message-id:date:in-reply-to:comments:references:to:subject
         :mime-version;
        bh=X4oocLSk5W1lSfwc/6PRTIr9zI0ig2O5JvXEzSwNM3g=;
        b=jVqVdYhWDOxT67ttteNt6CtUDQ+upVbfNUABgDuTitICyfLHLXM556/CUc10TBDpr2
         BQtg3Z5PJ0AgKfYMLVqVEQZwIOjrNnUayWL0ZRb3jfLzgdAKFLh+ps2Ggn/xF5o2rx16
         6GCuNj0ijTz7zsQ8phqn22CU+wbfKigHFNeLjrUTiDhoz8t4a7wWcLoQFjZnRd4gL/uD
         JgfiwVYEcVzAiYGUPDPMeXFZCDJ10/l60yy43bli5YsaI42AJy1FVMldpZk5dDGHRJKf
         5Dx5lmSTEWB9kTyHoPdGXVQVLrHttXoeTOKFey+oYXIIvC/qjMr2sNnSAmAtPwgIWO6W
         R5rw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:date:in-reply-to:comments
         :references:to:subject:mime-version;
        bh=X4oocLSk5W1lSfwc/6PRTIr9zI0ig2O5JvXEzSwNM3g=;
        b=Ngm607HTVzYAX+LCtsJpJJgfsTTXlpPVZOUuR3DtKhyinwYzkREs2CkHh+/Ny0RQwj
         /BZdN1FD5ggaoywFQMlBR7Z/WZxvhU33JIFedOcMRxglvHT89phtUnSTLDYV7tmpTh2c
         miUeRFAKJdC5hKVV9LGlvBSW+qhtS0tNvYsH2b4BS6+w0rdl7XPy2WqNUlvKQ5owiheZ
         0PG2CDXjI5wEFH++lPqqk7r1DSWQWNeE/JaLVAmVAy7YxQvSKZfjeDPC7/g7GGWM5+5t
         6c5gzbYviB6SyAC29+WM1A3kp++QlgcASywYN0yCXSIdm4d0U1TYzb5vlQzleS3AT/5c
         kt8g==
X-Gm-Message-State: AOPr4FUOwVgyPH0UQbe+c1mbz7piVOj4OVOQJWSMASmXZ6OoLlQtY1ZZo+gB9A/81H6ssA==
X-Received: by 10.66.160.168 with SMTP id xl8mr5950223pab.132.1460266775493;
        Sat, 09 Apr 2016 22:39:35 -0700 (PDT)
From: Bart Schaefer <schaefer@brasslantern.com>
Message-Id: <160409224042.ZM25419@torch.brasslantern.com>
Date: Sat, 9 Apr 2016 22:40:42 -0700
In-Reply-To: <20160409205142.4d23676a@ntlworld.com>
Comments: In reply to Peter Stephenson <p.w.stephenson@ntlworld.com>
        "Re: PATCH: short-circuiting glob exclusion operator" (Apr  9,  8:51pm)
References: <20160321183649.4fd4d72a@pwslap01u.europe.root.pri> 
	<160321155421.ZM27019@torch.brasslantern.com> 
	<20160322094614.13b07bf4@pwslap01u.europe.root.pri> 
	<160326084042.ZM12055@torch.brasslantern.com> 
	<20160407211027.2c305cad@ntlworld.com> 
	<160407201830.ZM3747@torch.brasslantern.com> 
	<20160409192218.3f1d6710@ntlworld.com> 
	<CAHYJk3QzmTj_kWZ+L7MDCnW+=Bmfw6UejROKkWoRjNyWyaLW+Q@mail.gmail.com> 
	<20160409205142.4d23676a@ntlworld.com>
X-Mailer: OpenZMail Classic (0.9.2 24April2005)
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: short-circuiting glob exclusion operator
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Seq: zsh-workers 38261

On Apr 9,  8:51pm, Peter Stephenson wrote:
} Subject: Re: PATCH: short-circuiting glob exclusion operator
}
} On Sat, 9 Apr 2016 21:00:36 +0200
} Mikael Magnusson <mikachu@gmail.com> wrote:
} > The only argument against this syntax (and I'm not saying it's a
} > strong argument) is that you have to choose between being able to
} > shortcircuit a subtree, or excluding a particular match that happens
} > to be a directory (while still including children of that directory).
} 
} They're not actually in competition; I meant to ensure it was possible
} to specify both, which I've done.

I think Mikael is asking about specifying both conditions in the *same*
glob pattern, i.e. **/*~*/foo~*/bar(Y-) such that bar directories are
short-circuited whereas only paths ending in foo are excluded, but any
files below a directory foo remain.  Your doc and the comments about
treating multiple ~ as if they were | seem to imply that both foo and
bar would be short-circuited in this example.

Of course one can still write **/*~*/foo~*/bar/* without (Y-).

