zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: Various notes on KSH_GLOB
Date: Thu, 30 May 2013 16:10:10 +0100	[thread overview]
Message-ID: <20130530161010.54cb00e6@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <87obbsczfu.fsf@gmail.com>

On Thu, 30 May 2013 16:30:45 +0200
Christian Neukirchen <chneukirchen@gmail.com> 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


  reply	other threads:[~2013-05-30 15:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 14:30 Christian Neukirchen
2013-05-30 15:10 ` Peter Stephenson [this message]
2013-05-30 15:53 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130530161010.54cb00e6@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).