put clear-screen on ESC ^L as suggested by the AT&T ksh people in

http://www.opensolaris.org/os/community/on/flag-days/pages/2007081701/
This commit is contained in:
tg 2007-08-18 01:20:28 +00:00
parent e99f988aae
commit 49c95a8938
2 changed files with 4 additions and 3 deletions

3
edit.c
View File

@ -5,7 +5,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.110 2007/07/31 15:42:50 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.111 2007/08/18 01:20:27 tg Exp $");
/* tty driver characters we are interested in */
typedef struct {
@ -1348,6 +1348,7 @@ static struct x_defbindings const x_defbindings[] = {
{ XFUNC_mv_end, 0, MKCTRL('E') },
{ XFUNC_mv_begin, 0, MKCTRL('A') },
{ XFUNC_draw_line, 0, MKCTRL('L') },
{ XFUNC_cls, 1, MKCTRL('L') },
{ XFUNC_meta1, 0, MKCTRL('[') },
{ XFUNC_meta2, 0, MKCTRL('X') },
{ XFUNC_kill, 0, MKCTRL('K') },

4
mksh.1
View File

@ -1,4 +1,4 @@
.\" $MirOS: src/bin/mksh/mksh.1,v 1.97 2007/08/18 00:22:08 tg Exp $
.\" $MirOS: src/bin/mksh/mksh.1,v 1.98 2007/08/18 01:20:28 tg Exp $
.\" $OpenBSD: ksh.1,v 1.120 2007/05/31 20:47:44 otto Exp $
.\"
.Dd August 18, 2007
@ -4454,7 +4454,7 @@ Moves the cursor to the beginning of the edited input line.
Uppercase the first character in the next
.Ar n
words, leaving the cursor past the end of the last word.
.It clear-screen: (not bound)
.It clear-screen: ^[^L
Prints a compile-time configurable sequence to clear the screen and home
the cursor, redraws the entire prompt and the currently edited input line.
The default sequence works for almost all standard terminals.