From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7263 invoked by alias); 24 May 2012 02:10:14 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17125 Received: (qmail 7304 invoked from network); 24 May 2012 02:10:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at linux.vnet.ibm.com does not designate permitted sender hosts) Date: Thu, 24 May 2012 09:59:30 +0800 From: Han Pingtian To: zsh-users@zsh.org Subject: Re: globbing in assignment Message-ID: <20120524015930.GC2383@localhost.localdomain> References: <20120523061859.GA2383@localhost.localdomain> <20120523101043.089b8ea7@pwslap01u.europe.root.pri> <20120523100846.GB2383@localhost.localdomain> <20120523113056.3021a8d7@pwslap01u.europe.root.pri> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120523113056.3021a8d7@pwslap01u.europe.root.pri> User-Agent: Mutt/1.5.21 (2010-09-15) X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12052401-1780-0000-0000-000005D608ED X-IBM-ISS-SpamDetectors: X-IBM-ISS-DetailInfo: BY=3.00000276; HX=3.00000188; KW=3.00000007; PH=3.00000001; SC=3.00000002; SDB=6.00141827; UDB=6.00032736; UTC=2012-05-24 01:59:52 On Wed, May 23, 2012 at 11:30:56AM +0100, Peter Stephenson wrote: > On Wed, 23 May 2012 18:08:46 +0800 > Ah, you're misunderstanding what's going on. > > GLOB_ASSIGN has the effect that > > v=* > > expands * at this point. The value of v contains all the files. > > GLOB_SUBST has the effect that a variable is expanded at the point where > it's substituted. So without GLOB_ASSIGN, or equivalently quoting the > value assigned to v, > > % v='*' > % setopt globsubst > % print $v > > % unsetopt globsubt > % print $v > * > Thanks. Now I got it.