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

Re: special/readonly variables in sh emulation



Oliver Kiddle wrote:
> We perhaps ought to rethink the status of any special variables
> in sh emulation mode. Especially those which are autoloaded out of
> places like zsh/parameter. Any ideas on how to solve this?

Yes, this looks like a big compatibility problem if it's happening in sh
mode.

I guess the problem is `load=yes' in zleparameter.mdd --- if it wasn't
always loaded there would be no problem.  Is it just enough to set that
to `no' and make zle load it when it needs to run a widget?  (If you're
using zle or completion widgets, all bets about compatibility are off.)
If so, we can forget the more sophisticated solutions below which I
wrote before that occurred to me.

One way would be to track dependency information better.  zsh/parameter
is loaded by default because zle needs it.  zle itself is not used in a
non-interactive shell.  So unless the user has directly registered an
interest in zsh/parameter we shouldn't load it until we need zle.

Another is to shift this sort of parameter into a namespace, as we've
been planning for a long time.  I think Sven had a way of doing this
simply by allowing dots in parameter names --- it wasn't a fully
featured namespace implementation, but it might be close enough to allow
us to go over to that if anybody had the time to write it.

Another is to restrict visibility of zsh/parameter to zle somehow unless
the user has asked for it explicitly.

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