From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4693 invoked by alias); 27 Nov 2014 01:53:00 -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: 19452 Received: (qmail 7626 invoked from network); 27 Nov 2014 01:52:59 -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=AKpDk7pY 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=E9138qaWAOerSttNSRkA:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <141126175240.ZM11126@torch.brasslantern.com> Date: Wed, 26 Nov 2014 17:52:40 -0800 In-reply-to: Comments: In reply to Mikael Magnusson "Re: Glob specifiers for intermediate path components" (Nov 26, 7:00pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: Glob specifiers for intermediate path components MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Nov 26, 7:00pm, Mikael Magnusson wrote: } } > More generally, how can I specify glob qualifiers for intermediate } > path components? In spirit: } > } > $ print -l a(...)/b(...)/c(...)/d(...)/e(...)/f(...) } } You can't, as such. There are at least two workarounds I can think of. A third would be something like this: glueglob() { emulate -R zsh -o csh_null_glob local here there while (( ARGC )) do here=( $^here$~1 ) here=( ${^here}${2:+/} ) shift done print $here } print -l $( noglob glueglob a(...) b(...) c(...) d(...) e(...) f(...) ) There's almost certainly a fancy expression that could be written to split a(...)/b(...)/c(...)/d(...)/e(...)/f(...) on the slashes without being confused by the (/) glob qualifier, but I'm not going to attempt to write it tonight.