From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28461 invoked from network); 19 May 2005 18:31:04 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 19 May 2005 18:31:04 -0000 Received: (qmail 64010 invoked from network); 19 May 2005 18:30:57 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 19 May 2005 18:30:56 -0000 Received: (qmail 23414 invoked by alias); 19 May 2005 18:30:49 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8872 Received: (qmail 23405 invoked from network); 19 May 2005 18:30:49 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 19 May 2005 18:30:49 -0000 Received: (qmail 62989 invoked from network); 19 May 2005 18:30:49 -0000 Received: from lakermmtao05.cox.net (68.230.240.34) by a.mx.sunsite.dk with SMTP; 19 May 2005 18:30:43 -0000 Received: from quark.hightek.org ([68.12.75.33]) by lakermmtao05.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050519183041.ORFI13442.lakermmtao05.cox.net@quark.hightek.org> for ; Thu, 19 May 2005 14:30:41 -0400 Received: by quark.hightek.org (Postfix, from userid 501) id 1BBB945933; Thu, 19 May 2005 13:28:20 -0500 (CDT) Date: Thu, 19 May 2005 13:28:20 -0500 From: Vincent Stemen To: zsh-users@sunsite.dk Subject: Re: variable assignment in a script using globsubst Message-ID: <20050519182820.GA3586@quark.hightek.org> References: <20050518044354.GA96824@quark.hightek.org> <17522.1116409750@csr.com> <20050518172202.GA98847@quark.hightek.org> <18909.1116438565@csr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18909.1116438565@csr.com> User-Agent: Mutt/1.4.1i X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 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