From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3022 invoked by alias); 27 Nov 2014 05:47:23 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19457 Received: (qmail 28186 invoked from network); 27 Nov 2014 05:47:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=IOK10brD c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=5y4faFyK3SkA:10 a=cIqawwAF9jmDK7wx5r4A:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <141126214651.ZM13027@torch.brasslantern.com> Date: Wed, 26 Nov 2014 21:46:51 -0800 In-reply-to: Comments: In reply to Jorg Ziefle "Re: Glob specifiers for intermediate path components" (Nov 27, 5:27am) References: <141126175240.ZM11126@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Glob specifiers for intermediate path components MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Nov 27, 5:27am, Jorg Ziefle wrote: } Subject: Re: Glob specifiers for intermediate path components } } On Thu, Nov 27, 2014 at 2:52 AM, Bart Schaefer } > split a(...)/b(...)/c(...)/d(...)/e(...)/f(...) on the slashes without } > being confused by the (/) glob qualifier } } $ perl -e '$_="a(.)/b(@)/c(/N)/d(*)/e(@)/f/g/h/i(/)"; while } (m{((.*?)(\(.*?\))?)(/|$)}g) { print "$1\n" }' It probably doesn't have to be that grotty ... just split on ")/" and then patch up the lost close parens, for example. Yes, you can come up with a convoluted qualifier that has ")/" embedded in it, so it wouldn't be perfect, but it'd cover 99+% of interactive use.