zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: (#cN,M) error, %? doesn't glob
Date: Thu, 23 Jun 2011 21:12:47 -0700	[thread overview]
Message-ID: <110623211249.ZM11110@torch.brasslantern.com> (raw)
In-Reply-To: <BANLkTineRk+V1C8osSn0j5OhEbgrgDwrug@mail.gmail.com>

On Jun 24,  4:00am, Mikael Magnusson wrote:
}
}  The flag tt(LPAR()#c)var(N)tt(,)var(M)tt(RPAR()) can be used anywhere
} +that the tt(#) or tt(##) operators can be used except in the expressions
} +`tt((*/)#)' and `tt((*/)##)'

That's not quite right.  [[ bar/foo == (*/)(#c1,2)foo ]] does not produce
a bad pattern error.  It's only in glob context where "/" has special
significance that (*/)# is also a special case.

} While looking at Src/glob.c I also noticed that ? is ignored for
} globbing if it is preceded by a % at the start of a string, is that
} documented anywhere?

Etc/BUGS -- second to last entry.

} I sort of feel like an explicit option for this would be a bit awkward.

See one proposed fix in Etc/BUGS ...

I believe this behavior is actually "inherited" from csh -- one original
design goal of zsh was to import as much as possible of csh's interactive
behavior into the Bourne shell's syntax structure.

Tcsh seems to have solved it by making builtins that manipulate jobs into
special keywords that alter the parse of what comes after, much in the
way that ksh applies assignment context to arguments that follow the
typeset and local builtins:

$ echo %?foo
echo: No match.
$ fg %?foo
fg: No job matches pattern.



-- 


  reply	other threads:[~2011-06-24  4:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-24  2:00 Mikael Magnusson
2011-06-24  4:12 ` Bart Schaefer [this message]
2011-08-14  7:44   ` Mikael Magnusson
2011-08-14 22:56     ` Bart Schaefer
2011-08-14 23:21       ` Mikael Magnusson

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=110623211249.ZM11110@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).