From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from artemis.le.ac.uk ([143.210.16.126]) by hawkwind.utcs.toronto.edu with SMTP id <9635>; Wed, 3 Apr 2002 15:00:51 -0500 Received: from happy.star.le.ac.uk ([143.210.36.58]) by artemis.le.ac.uk with smtp (Exim 3.16 #1) id 16slnE-00053u-00 for rc@hawkwind.utcs.toronto.edu; Wed, 03 Apr 2002 15:31:20 +0100 Received: (qmail 17969 invoked from network); 3 Apr 2002 14:31:30 -0000 Received: from fozzie.star.le.ac.uk (143.210.36.216) by happy.star.le.ac.uk with QMQP; 3 Apr 2002 14:31:30 -0000 Date: Wed, 3 Apr 2002 09:31:30 -0500 Message-ID: <20020403143130.22327.qmail@happy.star.le.ac.uk> From: Tim Goodwin To: paul@paulhaahr.com CC: rc@hawkwind.utcs.toronto.edu In-reply-to: <8ZFwtjf51i@dmul.paulhaahr.com> Subject: Re: rc 1.6 $version References: <20020314223715.003CB3F40B@quanstro.net> <20020327132716.23114.qmail@happy.star.le.ac.uk> <20020327221226.A25153@strozzi.it> <8ZFwtjf51i@dmul.paulhaahr.com> Paul Haahr wrote: > > Any objections to `rc_version'? > > I'd prefer $rc-version, but either should be fine. (As it turns out, this is all irrelevant, but I have would two objections to this. First, `-' turns on free careting, so you'd have to say things like this. ; whatis $'rc-version' Not so bad, but wrap it in another level of quotes, perhaps from a less sane shell, and it starts to get *very* ugly. $ rc -c 'whatis $'"'rc-version'" Secondly, rc is meant to be C-ish, not Lisp-ish.) > However, making it such a magic variable feels silly. As Eric noted, > having assignments to a variable just be eaten without warning seems, > er, surprising at best. Mea culpa. I failed to realise that there are two types of special variable in rc: 1) those that merely have a default initial value, and 2) those that invoke special code when substituted. Till now, $version was in category 2. I've just moved it to category 1. Category 2 now contains just $apids and $status, which seems about right; they are both, of necessity, magical. Category 1 now contains $ifs, $path, $pid, $prompt, and $version. (I was surprised to discover that assignments to pid are persistent!) As a separate matter, several variables are not exportable. These are: $apid, $apids, $cdpath, $home, $ifs, $path, $pid, and $*. (Remember that $cdpath, $home, and $path are all aliased to upper case versions, which *are* exportable. Also, the default assignment to $path happens before $PATH is examined: so if $PATH is set, $path will acquire its value instead of the default.) I think $bqstatus and $status ought to be non-exportable too. I've just made them so; you can all see what this breaks in the next release candidate :-). Tim.