rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Paul Haahr <haahr@jivetech.com>
To: Decklin Foster <fosterd@hartwick.edu>, Gert-Jan Vons <vons@ocegr.fr>
Cc: rc@hawkwind.utcs.toronto.edu
Subject: Re: tilde featuritis alert
Date: Thu, 9 Dec 1999 11:48:49 -0500	[thread overview]
Message-ID: <cUjYRN6bK5b@iadd.jivetech.com> (raw)
In-Reply-To: <19991209025205.B305@debian>

[I hate to jump into an incipient flame war, but...]

Decklin Foster wrote:
> is the lack of an sh-like '~' a personal preference of the author, or
> just not feasible to implement due to rc's eval-once semantics?

Tom Duff's rc (the Plan 9 version) didn't support ~, probably because
none of the Bell Labs shells used ~ for home directory expansion.

Byron kept just about everything the same as Duff's rc in his version,
with the merciful exception of ``if not.''  And, at the time, we were
both strong Bell Labs purists and mocked the people who suggested that
~-expansion was an appropriate shell feature.

When we wrote es, it got almost all the features which real rc users had
complained were missing in rc, in addition to the extensibility features.
(Can you say ``second system effect''?  I thought you could.)  Of course,
this includes ~-expansion.  In fact, ~-expansion is configurable, so you
can have it do whatever you want, including throw an error if you're
offended by having the feature in the shell.

These days, I use es and swear by ~-expansion.  Byron never bothered to
switch (why would he?  rc is perfect for all practical purposes) and
still wonders why anyone would want ~-expansion.  And despite this major
rift, we've somehow stayed friends.

Gert-Jan Vons wrote
> Something that I still haven't gotten used to even after 5-6 years of 
> using rc is the need to quote command arguments if there's an equal sign 
> like in "dd 'if=infile' 'of=outfile'".

Me neither.  I still consider it a bug in both rc and es.

(An intermediate program between rc and es called hs, for ``hypothetical
shell,'' actually fixed this by hacking the grammar, but I've never seen
another Yacc grammar that unpleasant.*  If I remember, the interactions
with ^, which are already horrible, became combinatorily worse.  But it
definitely is possible to make it work.)

> I once asked for an extension that would allow me to do "dd if\=infile
> of\=outfile" but that got killed pretty fast :-/

This, actually, does work in es.

--p

* Ok, you're right, the C++ parsers are that bad.


  parent reply	other threads:[~1999-12-09 21:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-09  7:52 Decklin Foster
1999-12-09  8:26 ` Markus Friedl
1999-12-09  8:52 ` Gert-Jan Vons
1999-12-09 14:20   ` Decklin Foster
1999-12-09 16:48   ` Paul Haahr [this message]
1999-12-09 16:27 ` Mark K. Gardner
1999-12-09 22:08 ` kim kubik
1999-12-10  7:45 Byron Rakitzis
1999-12-10  9:32 ` Gert-Jan Vons

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=cUjYRN6bK5b@iadd.jivetech.com \
    --to=haahr@jivetech.com \
    --cc=fosterd@hartwick.edu \
    --cc=rc@hawkwind.utcs.toronto.edu \
    --cc=vons@ocegr.fr \
    /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).