Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: globbing in assignment
- X-seq: zsh-users 17117
- From: Peter Stephenson <Peter.Stephenson@xxxxxxx>
- To: <zsh-users@xxxxxxx>
- Subject: Re: globbing in assignment
- Date: Wed, 23 May 2012 10:10:43 +0100
- In-reply-to: <20120523061859.GA2383@localhost.localdomain>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Organization: Cambridge Silicon Radio
- References: <20120523061859.GA2383@localhost.localdomain>
On Wed, 23 May 2012 14:18:59 +0800
Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx> 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.
--
Peter Stephenson <pws@xxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author