rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: malte@TechFak.Uni-Bielefeld.DE
To: rc@hawkwind.utcs.toronto.edu
Subject: Re: wishlist
Date: Tue, 25 May 1993 02:55:12 -0400	[thread overview]
Message-ID: <9305250655.AA28604@idefix.techfak.uni-bielefeld.de> (raw)
In-Reply-To: Mail from 'Alan Watson <alan@oldp.astro.wisc.edu>' dated: 	Mon, 24 May 1993 21:43:43 -0400

In response to  Alan Watson <alan@oldp.astro.wisc.edu>:

	(a) Here strings: use "echo 'foo' | bar" instead of "bar <<< 'foo'"
		For more complex cases, like "bar <<<[0]'foo0' <<<[1]'foo1'" use "echo
		'foo0' |[1=0] { echo 'foo1' |[1=1] bar }"

Well, I made this mistake too:
	echo 'foo' != 'foo'
but
	echo -n 'foo' == 'foo'

I think it's too much typing ( see answer to backqoutes ). But I wouldn't
bother if here string were removed because I don't use them anyway.


	(b) The flattening operator: use a function instead

rc lists are always flat, so reading your function definition, I assume
you mean joining a lists elements into a single element. If this is the case
use
	fn flatten {$1=``(){echo -n $$1}}

because your flattening function uses the flattening operator it tries to
replace.

	(c) `` backquote substitution: use

Yes, this will surely simplify the parser, but in my experience simplicity
is not the ultimate goal. In a real worlds shell you have to watch for
conveniencies, too. Whenever I try to persuade people to use rc, after
a while they'll complain about too much typing because of oversimplified
quoting rules. That's why I asked for backslash escapes. I like the "``"
mechanism very much. And besides, what should be The Right Thing to do

	; ifs = () { echo $#ifs $ifs }
	0
or
	1
I mean, should ifs be unset or set to an empty list ? What does it mean if
ifs not set ? If set to an empty list, this would be different from every
other variable.

	(d) newpgrp: use a wrapper around rc

You'll loose the history list when using readline or editline.

And another thing that hasn't been discussed here: What about compatibility
with plan 9 rc ?

Malte



       reply	other threads:[~1993-05-25  6:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alan@oldp.astro.wisc.edu>
1993-05-25  6:55 ` malte [this message]
1993-05-25  9:16   ` wishlist John Mackin
1993-05-26 17:49 wishlist Tom Culliton x2278
  -- strict thread matches above, loose matches on Subject: below --
1993-05-26 17:29 wishlist Alan Watson
1993-05-26 17:26 wishlist Alan Watson
1993-05-26 16:59 wishlist Tom Culliton x2278
1993-05-26  6:57 wishlist Bengt KLEBERG
1993-05-26 17:51 ` wishlist Chris Siebenmann
1993-05-26 19:04 ` wishlist mycroft
1993-05-26  3:08 wishlist Alan Watson
1993-05-26  3:02 wishlist Byron Rakitzis
1993-05-26  3:06 ` wishlist Scott Schwartz
1993-05-25 23:58 wishlist Tom Culliton x2278
1993-05-25 21:29 wishlist Alan Watson
1993-05-25  1:43 wishlist Alan Watson
1993-05-24 16:13 wishlist Erik Quanstrom
1993-05-24 15:17 wishlist Tom Culliton x2278
1993-05-22  0:43 wishlist Scott Schwartz

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=9305250655.AA28604@idefix.techfak.uni-bielefeld.de \
    --to=malte@techfak.uni-bielefeld.de \
    --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).