From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18822 invoked from network); 5 Aug 1999 04:28:59 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Aug 1999 04:28:59 -0000 Received: (qmail 16293 invoked by alias); 5 Aug 1999 04:28:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7361 Received: (qmail 16286 invoked from network); 5 Aug 1999 04:28:51 -0000 From: "Bart Schaefer" Message-Id: <990805042841.ZM15207@candle.brasslantern.com> Date: Thu, 5 Aug 1999 04:28:41 +0000 In-Reply-To: Comments: In reply to "Owen M. Astley" "noglob and setting variables" (Aug 4, 7:01pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: "Owen M. Astley" , zsh-workers@sunsite.auc.dk Subject: Re: noglob and setting variables MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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