Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: typeset -T versus typeset -r, bug or feature?
- X-seq: zsh-workers 22687
- From: Peter Stephenson <pws@xxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Subject: Re: typeset -T versus typeset -r, bug or feature?
- Date: Mon, 11 Sep 2006 14:45:06 +0100
- In-reply-to: <060905202415.ZM11437@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: Cambridge Silicon Radio
- References: <060905202415.ZM11437@xxxxxxxxxxxxxxxxxxxxxx>
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Do this in an interactive shell so that the third line doesn't cause the
> shell to exit:
>
> typeset -T READ write
> typeset -r READ
> READ=wrong
zsh: read-only variable: READ
> write=right
> print $READ
right
This is a feature. The parameters are different interfaces to the same
information. "typeset -r write" will work as expected. This is inevitable
given the current model for internal parameter storage. I'm not
particularly attached to the current system anyway; parameters are probably
the clunkiest remaining parts of the system, full of ad-hoc tests,
over-complicated but under-powerful interfaces, and accesses into the
system at all sorts of different levels that ought to be implementation
details.
--
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