From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1038 invoked from network); 10 Jun 1998 18:09:37 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 10 Jun 1998 18:09:37 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id OAA15969; Wed, 10 Jun 1998 14:01:56 -0400 (EDT) Resent-Date: Wed, 10 Jun 1998 14:01:56 -0400 (EDT) From: Zefram Message-Id: <199806101801.TAA21245@taos.demon.co.uk> Subject: Re: Variable namespaces, goals for ZLE, etc. To: schaefer@brasslantern.com (Bart Schaefer) Date: Wed, 10 Jun 1998 19:01:35 +0100 (BST) Cc: zefram@tao.co.uk, zsh-workers@math.gatech.edu In-Reply-To: <980610103728.ZM12142@candle.brasslantern.com> from "Bart Schaefer" at Jun 10, 98 10:37:28 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"wkNv62.0.Ov3.JeiVr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4092 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Bart Schaefer wrote: >Are there any "available" names in the POSIX space? Depends what you mean by "available". POSIX lists "the special parameters" as being "*", "@", "#", "?", "-", "$", "!" and "0"; by implication, all other parameters have the semantics of normal variables. It lists "IFS", "PATH", "PPID" et al as normal variables that are either set or read by the shell, but does not permit them to have any weird semantics beyond those it defines. It is arguable that the shell can modify its behaviour based on the values of other variables, but it certainly isn't permitted to make variables with normal names behave as special variables. >The problem with introducing an incompatible syntax in order to escape >POSIX is that you can't reliably export variables with the new names. You can export anything. Whether other utilities accept anything unusual is, admittedly, a more complicated issue. >I've used versions of sh that would mangle the environment and/or issue >warning messages if there were any strings present where the stuff to >the left of the `=' contained characters other than [A-Z][a-z][0-9]_. We could do a configure test for that. Perhaps if the local sh does complain, we could import/export using munged names starting with "__ZSH__" or something like that. Within zsh, the variable name "__ZSH__" would still be legal, it would just be exported under a different name. Alternatively, we keep things simple, and just don't import/export special variables on platforms that really can't handle it -- there can't be many of them, surely? -zefram