rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: rjc@math.Princeton.EDU (Raymond Chen)
To: rc@archone.tamu.edu
Subject: Re: Ctrl-L in editline
Date: Sat, 8 Feb 1992 15:33:11 -0600	[thread overview]
Message-ID: <9202082133.AA23376@math.princeton.edu> (raw)

malte@techfak.uni-bielefeld.de claims that Ctrl-L should clear the entire
screen instead of merely redrawing the current line.

I forcefully disagree.  Why should Ctrl-L clear the screen?  Ctrl-L in
emacs, vi, and most curses-based programs is the ``redraw current
screen'' command, not the ``clear current screen'' command.  Since
editline's ``screen'' is but a single line, it should redraw only that
line.

Imagine:  I've just received a `talk' request.  My friend Byron is
coming in from a machine I've never seen before with a complicated
name, so I have to type his address in very carefully.

    talk tbrakitz@phoe

and *BLAM* some line noise hits my modem.  I want to get rid of the line
noise, so I type Ctrl-L to get readline to reprint my current command.
But wait, that Ctrl-L also zapped my current screen!  Ugh, that also
erased byron's address!  I'm hosed!

If you want the screen to clear, type ``clear''.  Thank you.

ObRcHack:  Set your prompt to

    prompt = ('; ' ':\010')

This way, continuation lines are prompted with a `:', but the `:'
is erased by your typing.  You get the benefit of a prompt (to let
you know you miscounted your quotation marks), yet the prompt doesn't
stop you from snarfing-and-barfing.  (If you want to type a blank
line, remember to type `space backspace enter' instead.)



                 reply	other threads:[~1992-02-08 21:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=9202082133.AA23376@math.princeton.edu \
    --to=rjc@math.princeton.edu \
    --cc=rc@archone.tamu.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).