From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id UAA09342 for ; Thu, 29 Jun 1995 20:27:20 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA15655 (5.65c/Gatech-10.0-IDA for ); Thu, 29 Jun 1995 06:24:09 -0400 Received: by math (5.x/SMI-SVR4) id AA10764; Thu, 29 Jun 1995 06:21:30 -0400 Resent-Date: Thu, 29 Jun 1995 12:20:51 +0100 (MET DST) Old-Return-Path: From: hzoli@cs.elte.hu (Zoltan Hidvegi) Message-Id: <9506291020.AA28075@turan.elte.hu> Subject: Re: Z-Shell Frequently-Asked Questions (monthly posting) To: zsh-workers@math.gatech.edu (zsh-workers) Date: Thu, 29 Jun 1995 12:20:51 +0100 (MET DST) In-Reply-To: <9119.9506291002@pyro.swan.ac.uk> from "P.Stephenson@swansea.ac.uk" at Jun 29, 95 11:02:31 am X-Mailer: ELM [version 2.4 PL21] Content-Type: text Resent-Message-Id: <"9far41.0.6e2.fwdyl"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/123 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu P.Stephenson@swansea.ac.uk wrote: > hzoli@cs.elte.hu wrote: > > > B1) Differences from sh and ksh > > > ... > > > Command line substitutions, globbing etc.: > > > > Just one addition here: foo=* assignment assigns the list of files in the > > current directory as an array to foo if there are at least two matches, or if > > there is a single file in the directory, foo becames a scalar whose value is > > the name of that file. Other Bourne shells does not glob the right hand side > > of assignments. In my releases the default behaviour is to not glob here, but > > this can be changed by setting the GLOB_ASSIGN option. > > I agree this is a little inconsistent. What about `foo=(*)', though? > I use that kind of thing a lot, and it seems obvious to me that it > should always do globbing --- at least, I tend to think of arguments > of an array assignment behaving like command line arguments as far as > word splitting is concerned. Perhaps it's not obvious to others. (I > can do `set -A' but I like assignments to look like assignments.) Of course I agree, that foo=(*) should do globbing. That's the right way to do it. I did not change that in my release, moreover I recommend its usage in the manual. Zoltan