From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16676 invoked by alias); 23 May 2012 10:19:10 -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: 17119 Received: (qmail 29342 invoked from network); 23 May 2012 10:19:08 -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: Wed, 23 May 2012 18:08:46 +0800 From: Han Pingtian To: zsh-users@zsh.org Subject: Re: globbing in assignment Message-ID: <20120523100846.GB2383@localhost.localdomain> References: <20120523061859.GA2383@localhost.localdomain> <20120523101043.089b8ea7@pwslap01u.europe.root.pri> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120523101043.089b8ea7@pwslap01u.europe.root.pri> User-Agent: Mutt/1.5.21 (2010-09-15) X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12052310-6078-0000-0000-00000B51EF5D On Wed, May 23, 2012 at 10:10:43AM +0100, Peter Stephenson wrote: > On Wed, 23 May 2012 14:18:59 +0800 > Han Pingtian wrote: > > I just notice filename globbing doesn't occur in my script, like > > > > v=* > > > > but it works in the interactive shell. Althoug I can make it work > > by "setop glob_assign" or use "v=(*)", but it looks like the behavior's > > diversity is a little strange. > > > > Any thoughts? > > I would guess you don't have the option set in one case, but do in > another. Try putting "setopt globassign" at the start of the script, > which seems to do what I expect here. There's no explicit code to stop > it working in scripts. Thanks for reply. I don't set globassign in the interactive shell but the globbing is working in assigment. And finally I find out it's "glob_subst" which also has the same effect of "glob_assign". Maybe something is wrong? Looks like ther > > -- > Peter Stephenson Software Engineer > Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited > Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK > > > Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom > More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog