From: Tim Goodwin <tjg@star.le.ac.uk>
To: paul@paulhaahr.com
Cc: rc@hawkwind.utcs.toronto.edu
Subject: Re: rc 1.6 $version
Date: Wed, 3 Apr 2002 09:31:30 -0500 [thread overview]
Message-ID: <20020403143130.22327.qmail@happy.star.le.ac.uk> (raw)
In-Reply-To: <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.
next prev parent reply other threads:[~2002-04-03 20:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-14 22:37 erik quanstrom
2002-03-27 13:27 ` Tim Goodwin
2002-03-27 21:12 ` Carlo Strozzi
2002-03-30 18:43 ` Paul Haahr
2002-03-31 15:13 ` Carlo Strozzi
2002-04-03 14:31 ` Tim Goodwin [this message]
2002-04-03 15:06 ` Paul Haahr
2002-04-04 10:04 ` Tim Goodwin
2002-04-04 21:42 ` Scott Schwartz
2002-04-04 21:54 Byron Rakitzis
2002-04-05 8:35 ` Tim Goodwin
2002-04-05 1:38 Smarasderagd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020403143130.22327.qmail@happy.star.le.ac.uk \
--to=tjg@star.le.ac.uk \
--cc=paul@paulhaahr.com \
--cc=rc@hawkwind.utcs.toronto.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).