Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Z-Shell Frequently-Asked Questions (monthly posting)
- X-seq: zsh-workers 123
- From: hzoli@xxxxxxxxxx (Zoltan Hidvegi)
- To: zsh-workers@xxxxxxxxxxxxxxx (zsh-workers)
- Subject: Re: Z-Shell Frequently-Asked Questions (monthly posting)
- Date: Thu, 29 Jun 1995 12:20:51 +0100 (MET DST)
- In-reply-to: <9119.9506291002@xxxxxxxxxxxxxxx> from "P.Stephenson@xxxxxxxxxxxxx" at Jun 29, 95 11:02:31 am
P.Stephenson@xxxxxxxxxxxxx wrote:
> hzoli@xxxxxxxxxx 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author