rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Decklin Foster <fosterd@hartwick.edu>
To: rc@hawkwind.utcs.toronto.edu
Subject: Re: tilde featuritis alert
Date: Thu, 9 Dec 1999 09:20:32 -0500	[thread overview]
Message-ID: <19991209092032.A2018@debian> (raw)
In-Reply-To: <4.2.2.19991209092255.00ae2380@mailhost.ocegr.fr>; from vons@ocegr.fr on Thu, Dec 09, 1999 at 03:52:35AM -0500

Gert-Jan Vons writes:

> Something like "if (~ a b || ~ c d)" becomes quite messy when you
> only have 'switch'.

Ah, true.

> I doubt you will see tilde expansion in rc anytime soon, since it
> doesn't go with the philosophy behind the shell (just look at the
> debates over 'echo' being built-in or not).

Yeah, i read up on the archives and I see what you mean; I don't agree
with the idea that tilde expansion makes rc more bloated or somehow
doesn't 'belong' in a shell (computers are supposed to work for us,
not the other way around, no?) I was just hoping that perhaps someone
else who was bothered by this had already done the work of writing a
patch.

> I've been thinking and discussing a bit with other rc/vrl users
> about adding ~ expansion to the vrl command-line editor, but it
> ain't that simple since there's no easy way to know whether the user
> wants the ~ to be the ~ operator or not.

I bet i can get readline to do this before passing the command to rc,
now that I think of this. After all, it *does* come from the people
who brought you (ick) Emacs. ;-)

> 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'".

It seems to me that a simple rule would suffice here. An '=' in the
first word of a command is interpreted as a metacharacter. An '=' in
the rest of it is not. Oh, but there is the issue of 'foo = bar' (I
find myself trying to do that frequently in sh now.) OK, an unquoted
'=' is a metacharacter iff (it's part of the first word || it's the
first character in the second word). That should continue to allow
'foo =bar' as well.

Does lex/yacc let us do this? I'm not much of an expert there.

-- 
Decklin
Written with Debian GNU/Linux - http://www.debian.org/


  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 [this message]
1999-12-09 16:48   ` Paul Haahr
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=19991209092032.A2018@debian \
    --to=fosterd@hartwick.edu \
    --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).