zsh-users
 help / color / mirror / code / Atom feed
From: Vincent Stemen <zsh@hightek.org>
To: zsh-users@sunsite.dk
Subject: Re: variable assignment in a script using globsubst
Date: Thu, 19 May 2005 13:28:20 -0500	[thread overview]
Message-ID: <20050519182820.GA3586@quark.hightek.org> (raw)
In-Reply-To: <18909.1116438565@csr.com>

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


      reply	other threads:[~2005-05-19 18:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-18  4:43 Vincent Stemen
     [not found] ` <zsh@hightek.org>
2005-05-18  9:49   ` Peter Stephenson
2005-05-18 17:22     ` Vincent Stemen
2005-05-18 17:49   ` Peter Stephenson
2005-05-19 18:28     ` Vincent Stemen [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=20050519182820.GA3586@quark.hightek.org \
    --to=zsh@hightek.org \
    --cc=zsh-users@sunsite.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).