From: Peter Stephenson <pws@tinky-winky>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: Unexpected "unknown file attribute" error
Date: Mon, 12 Nov 2001 12:28:56 +0000 [thread overview]
Message-ID: <15840.1005568136@tinky-winky> (raw)
In-Reply-To: "Bart Schaefer"'s message of "Fri, 09 Nov 2001 01:22:35 GMT." <1011109012235.ZM14884@candle.brasslantern.com>
Bart Schaefer wrote:
> For obscure reasons, one of the machines I use at work has this function
> in root's .zshrc:
>
> function add-dir {
> which=$1
> shift
> foreach dir ($*) {
> eval $which=(\${$which} \$dir)
> }
> }
>
> This used to work in 3.0.x, but now that I've installed 4.0.4, it fails with
>
> add-dir:4: unknown file attribute
>
> Why isn't the space inside the parens enough to keep them from being treated
> as a glob qualifier? It used to be.
I think the change is in haswilds() --- so it affects whether globbing
takes place at all, not just qualifiers. It used to check whether there
were balanced parentheses with interesting-looking characters inside; now
it is triggered just by an open parenthesis.
The change is beyond the reach of CVS, but it may have changed to support
patterns like `foo|bar' in case statements --- they used to get wrapped by
an extra layer of parentheses, but now don't; simplifying the code may
have seemed the easiest bet.
Apart from the annoyance of the incompatibility, I don't see why unquoted
parentheses shouldn't trigger globbing, though --- it saves a lot of rather
picky tests which are hard to keep in line with the main globbing code.
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK Tel: +44 (0)1223 392070
prev parent reply other threads:[~2001-11-12 12:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-09 1:22 Bart Schaefer
2001-11-12 12:28 ` Peter Stephenson [this message]
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=15840.1005568136@tinky-winky \
--to=pws@tinky-winky \
--cc=zsh-workers@sunsite.dk \
/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).