From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: "Owen M. Astley" <oma1000@cam.ac.uk>, zsh-workers@sunsite.auc.dk
Subject: Re: noglob and setting variables
Date: Thu, 5 Aug 1999 04:28:41 +0000 [thread overview]
Message-ID: <990805042841.ZM15207@candle.brasslantern.com> (raw)
In-Reply-To: <Pine.OSF.3.96.990804185405.2268A-100000@alpha3.poco.phy.cam.ac.uk>
On Aug 4, 7:01pm, Owen M. Astley wrote:
} Subject: noglob and setting variables
}
} Is this a bug or a feature?
Neither, really ...
} alpha3-~% noglob a=(*)
} zsh: command not found: a=(*)
}
} So assignment using '=' doesn't appear to be a command. What is it
} then?
It's an assignment. The manual says:
A "simple command" is a sequence of optional parameter assignments
followed by blank-separated words, with optional redirections
interspersed. The first word is the command to be executed, and the
remaining words, if any, are arguments to the command.
The arguments to "noglob" are interpreted as a command to be executed and
its arguments, not as a complete "simple command." This is a consequence
of a decision made by Zoltan way back in June 1996, that "noglob" would
become a builtin rather than a reserved word. (PWS actually wrote the
patch.)
Before that, the form you tried probably did work, but things like
zsh% FOO=exec ; $FOO something
did NOT work, because of the order in which globbing and subsitutions had
to be done (or not) when parsing a line of input. See zsh-workers/1229 in
the archives, and follow the thread back and forth.
In addition to `noglob set -A a *` another way to get the effect you want
is
zsh% : ${(A)a=*}
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
prev parent reply other threads:[~1999-08-05 4:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-04 18:01 Owen M. Astley
1999-08-05 4:28 ` Bart Schaefer [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=990805042841.ZM15207@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=oma1000@cam.ac.uk \
--cc=zsh-workers@sunsite.auc.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).