From mboxrd@z Thu Jan 1 00:00:00 1970 To: Zsh users list Subject: Re: assigning parameters and globbing Date: Thu, 06 Apr 2006 10:27:09 +0100 From: Peter Stephenson Message-ID: Content-Type: text/plain MIME-Version: 1.0 X-Seq: zsh-users 10143 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 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