Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: variable assignment in a script using globsubst
- X-seq: zsh-users 8872
- From: Vincent Stemen <zsh@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: variable assignment in a script using globsubst
- Date: Thu, 19 May 2005 13:28:20 -0500
- In-reply-to: <18909.1116438565@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050518044354.GA96824@xxxxxxxxxxxxxxxxx> <17522.1116409750@xxxxxxx> <20050518172202.GA98847@xxxxxxxxxxxxxxxxx> <18909.1116438565@xxxxxxx>
On Wed, May 18, 2005 at 06:49:25PM +0100, Peter Stephenson wrote:
> Vincent Stemen wrote:
> > No, I "unsetopt globassign" to make sure, even though it did not show
> > in the list of currently set options, but it still works from the
> > command line. I was trying to do it this way because the script I am
> > working on is running in sh emulation mode and doing it as
> > "files=/bin/c*" assigns it as a single string. I ended up going ahead
> > and changing the one function to zsh mode and doing it as a list to
> > get around the problem, but I wonder if I have stumbled onto a bug
> > here.
>
> Do you have globsubst set? In that case, files will be set to /bin/c*
> but "echo $files" would expand the glob at that point.
Yes. That is what was happening. I was thinking globsubst would
cause it to expand even on a variable assignment. You are right, the
expansion was taking place in my echo statement when I did not have
quotes around $files. Ok. I guess I need to stick to doing it as a
list in zsh emulation mode.
Thank you for clarifying that.
--
Vincent Stemen
Avoid the VeriSign/Network Solutions domain registration trap!
Read how Network Solutions (NSI) was involved in stealing our domain name.
http://inetaddresses.net/about_NSI.html
Messages sorted by:
Reverse Date,
Date,
Thread,
Author