From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5610 invoked from network); 18 Mar 2002 14:08:31 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 18 Mar 2002 14:08:31 -0000 Received: (qmail 3422 invoked by alias); 18 Mar 2002 14:08:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16854 Received: (qmail 3409 invoked from network); 18 Mar 2002 14:08:20 -0000 To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: special/readonly variables in sh emulation In-reply-to: "Oliver Kiddle"'s message of "Mon, 18 Mar 2002 12:56:25 GMT." <20020318125625.GA1787@logica.com> Date: Mon, 18 Mar 2002 14:07:42 +0000 Message-ID: <27936.1016460462@csr.com> From: Peter Stephenson 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 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. **********************************************************************