Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: special/readonly variables in sh emulation

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 
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