On Sun, May 28, 2006 at 05:52:49PM -0400, Daniel Dickman wrote:
| Does anyone know how to bind ^L to clear the screen in a default 3.9
| installation? I'd prefer to not have to change to bash if I don't have
to...

Please note that when using emacs editing mode (I think this is the
default mode, unless you set VISUAL=vi or use `set -o vi` explicitly)
and when in command-mode in the vi editing mode, ^L is already bound
to redraw. This will redraw your current input line. See ksh(1) for
more info (search for \^L). But anyway...

What is wrong with using clear ? You could alias it to l or L or
create a function of the same name in your shell configuration file
(.profile) to have the same effect with the same number of keypresses.

Using an alias :
        alias l="/usr/bin/tput clear"
        alias L="/usr/bin/tput clear"

Using a function :
        l() { /usr/bin/tput clear; }
        L() { /usr/bin/tput clear; }

You could also try this in your shell :

        trap '/usr/bin/tput clear' 2

And press ^C. Note that this has some rather unfortunate side-effects
(apart from being silly), but it does does clear the screen on ^C.

A last option would be to send a patch for ksh that adds a clearscreen
command to bind to. Send it here and it'll probably get more attention
from developers. This is left as an excercise to you ;)

Good luck clearing your screen !

Paul 'WEiRD' de Weerd

--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/

[demime 1.01d removed an attachment of type application/pgp-signature]

Reply via email to