Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: assigning parameters and globbing
- X-seq: zsh-users 10143
- From: Peter Stephenson <pws@xxxxxxx>
- To: Zsh users list <zsh-users@xxxxxxxxxx>
- Subject: Re: assigning parameters and globbing
- Date: Thu, 06 Apr 2006 10:27:09 +0100
Vincent Lefevre wrote:
> I wonder why there isn't something similar in standard to avoid the "="
> in assignments, e.g. a typeset option -e: export -e BLAH *([-1])
This one's easy to do with a function:
setexport() { export $1=$2; }
setexport BLAH *([-1])
It's harder if you're trying to do something that makes BLAH local to
the immediately enclosing scope---zsh lets you set variables globally or
in the current scope but not in the immediately surrounding scope---but
you don't want that in this case.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
Messages sorted by:
Reverse Date,
Date,
Thread,
Author