rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: haahr@adobe.com
To: dylan@ibmpcug.co.uk
Cc: rc@hawkwind.utcs.toronto.edu
Subject: Re: -s flag
Date: Tue, 30 Jun 1992 11:29:58 -0400	[thread overview]
Message-ID: <9206301529.AA11747@utopia.adobe.com> (raw)

> It's a lot better to fix Jove than to 'fix' rc.  You could do this like
> vi/ex does it.  If I execute a subshell command in vi, then any % is
> replaced by the current filename, ie
> 	:!mv % %.bak
> would be expanded to
> 	:!mv foo foo.bak
> etc.  This is a lot better than hacking a kludge into rc for the sake of
> one editor.

i disagree vehemently.  shell variable subsitution is a much better defined
mechanism than vi's subtituting for %.  (e.g., how do you quote %?  what if
you invoked vi without a filename?)  in general, i take issue with any
program blindly editing input that the user has typed for another program,
even if that other program is a shell.

now, one could make the argument that the file should be stored in an
environment variable, e.g. $file, and if every editor were coerced to
use rc's notion of control-a separated lists, that would even work for
multiple files.  but $n is a logical place to put the file names, and
has no other conventional meaning for subshells invoked from editors.

even before Hugh posted his explaination on why jove does what it does,
i tended to agree with John that rc should support -s with the same meaning
as sh's -s, because it has evolved as a convention among shells, part of
the standard options set, like -c and -e.  now i'm convinced.

paul


             reply	other threads:[~1992-06-30 15:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-06-30 15:29 haahr [this message]
1992-07-01 12:52 ` Gerry.Tomlinson
1992-07-01 21:14   ` Chris Siebenmann
  -- strict thread matches above, loose matches on Subject: below --
1992-07-02 14:03 Chet Ramey
1992-07-01 21:30 "D. Hugh Redelmeier"
1992-07-02 12:52 ` Gerry.Tomlinson
1992-06-30 15:03 "D. Hugh Redelmeier"
1992-06-30  6:55 "D. Hugh Redelmeier"
1992-06-30  8:26 ` Matthew Farwell

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=9206301529.AA11747@utopia.adobe.com \
    --to=haahr@adobe.com \
    --cc=dylan@ibmpcug.co.uk \
    --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).