Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: special/readonly variables in sh emulation
- X-seq: zsh-workers 16869
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: special/readonly variables in sh emulation
- Date: Wed, 20 Mar 2002 13:53:00 +0000
- In-reply-to: "Oliver Kiddle"'s message of "Wed, 20 Mar 2002 12:55:19 GMT." <20020320125519.GA18479@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Oliver Kiddle wrote:
> Does that approach sound reasonable?
It sounds perfectly reasonable, the difficulty is probably how you make
all the current stuff with getsparam etc. fit in with a table stored in
the parameter.
> > One other point: I became aware when writing the map that calls to the
> > system are inefficient. Even if you're assigning a parameter, there are
>
> the map?
> and what do you mean by "the system" - the current parameter system?
This got truncated somehow, I meant the zsh/mapfile module, where
$mapfile actually reads in a complete file of arbitrary length, and
`mapfile[...]=' or `vared mapfile[...]' writes a value to it. The way
the assignment code works, you have to retrieve the value first (in the
case of vared, even if you just finished reading and modifying the
value). This shouldn't be necessary and it's particularly inefficient
in this case. This is where intelligent caching could help, at least in
the case where you actually had to read in the file; if you mapped it,
you would have to maintain extra system state information in order to
unmap it and it's probably not worth it.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK Tel: +44 (0)1223 392070
**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential
and/or privileged material.
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is
prohibited.
If you received this in error, please contact the sender and
delete the material from any computer.
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author