From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9013 invoked by alias); 30 May 2013 15:20:26 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31436 Received: (qmail 4848 invoked from network); 30 May 2013 15:20:19 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at samsung.com does not designate permitted sender hosts) X-AuditID: cbfec7f5-b7f376d000001ec6-9b-51a76bd3611d Date: Thu, 30 May 2013 16:10:10 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Various notes on KSH_GLOB Message-id: <20130530161010.54cb00e6@pwslap01u.europe.root.pri> In-reply-to: <87obbsczfu.fsf@gmail.com> References: <87obbsczfu.fsf@gmail.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+NgFupiluLIzCtJLcpLzFFi42I5/e/4Fd3L2csDDb4e1Lc42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGatXrWcs2MZbceNOWANjD3cXIyeHhICJRMvKh0wQtpjEhXvr 2boYuTiEBJYySvxc8IMZwlnOJHHv519WkCoWAVWJi7ObwGw2AUOJqZtmM4LYIgLiEmfXnmcB sYUF1CRONt4Gi/MK2Eu83rYFLM4poC6xf+oRoKHsQEPVJPZlgET5BfQlrv79BHWDvcTMK2eg OgUlfky+B9bJLKAlsXkbxFZmAXmJzWveMk9gFJiFpGwWkrJZSMoWMDKvYhRNLU0uKE5KzzXS K07MLS7NS9dLzs/dxAgJv687GJceszrEKMDBqMTDm5m0PFCINbGsuDL3EKMEB7OSCG+BM1CI NyWxsiq1KD++qDQntfgQIxMHp1QDY0GlbHLy099Wa9+XLL//XbTx1g6WO+8OfHxYy3Bj4lqG Wdb+s/vXfktOKzm07GVt6lJH5UNfa57+qE187vtVQ3SF+rHER2G8bt0zVFJKAy7Y11f4Zgp/ ajz3e3uF62ZzMcP3D/q+RHClm7OsiDnqdmrjbJf74bltdz5+uCSfv3N11aZ597SVfyuxFGck GmoxFxUnAgCm04nQHQIAAA== On Thu, 30 May 2013 16:30:45 +0200 Christian Neukirchen wrote: > juno% setopt kshglob >... > juno% echo *(v) > zsh: unknown file attribute You need to "unsetopt bareglobqual". This would be done automatically if you were in ksh emulation mode. Glob qualifiers are parsed first, so there's no way of making it prefer ksh globs. > juno% echo *(v|v/) > zsh: bad pattern: *(v|v/) > juno% setopt extendedglob > juno% echo (v/)# > v/ v/v/ v/v/v/ v/v/v/v/ v/v/v/v/v/ > > I realize that both mksh and ksh93 neither support directory recursion > with *() (but this would be nice to have, IMO, at last with the explicit > /), which probably only makes this a documentation bug: > > >> *(...) Match any number of occurrences. (Like `(...)#'.) Yes, it should say there's no equivalent to the (.../)# syntax. diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo index 89d5c06..e8d1ed2 100644 --- a/Doc/Zsh/expn.yo +++ b/Doc/Zsh/expn.yo @@ -1957,10 +1957,12 @@ item(tt(@LPAR())...tt(RPAR()))( Match the pattern in the parentheses. (Like `tt(LPAR())...tt(RPAR())'.) ) item(tt(*LPAR())...tt(RPAR()))( -Match any number of occurrences. (Like `tt(LPAR())...tt(RPAR()#)'.) +Match any number of occurrences. (Like `tt(LPAR())...tt(RPAR()#)', +except that recursive directory searching is not supported.) ) item(tt(PLUS()LPAR())...tt(RPAR()))( -Match at least one occurrence. (Like `tt(LPAR())...tt(RPAR()##)'.) +Match at least one occurrence. (Like `tt(LPAR())...tt(RPAR()##)', +except that recursive directory searching is not supported..) ) item(tt(?LPAR())...tt(RPAR()))( Match zero or one occurrence. (Like `tt(LPAR()|)...tt(RPAR())'.) pws