bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-readline] Command "clear-screen" should clear scrollback buffer


From: Chet Ramey
Subject: Re: [Bug-readline] Command "clear-screen" should clear scrollback buffer (if supported) as well
Date: Mon, 18 Dec 2017 16:06:38 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

On 12/14/17 4:56 PM, address@hidden wrote:
> Version: 6.3-release
> Machine: x86_64
> OS: linux-gnu
> Compiler: x86_64-solus-linux-gcc
> Machine Type: x86_64-solus-linux-gnu
> 
> Description:
> 
> The command "clear-screen" should clear terminal's scrollback buffer as well. 
> `clear` from ncurses does so. Seems like clearing scrollback along with 
> screen is desired behavior in almost all cases. Another option is to provide 
> "clear-screen-and-scrollback" command and let the user to pick what he like.

Thanks for the suggestion.

I'll take a look at some approaches.  Note that this is already pretty
trivial to do in bash:

bind -x '"\ei":"tput E3 2>/dev/null"'
bind "\eI": "\C-l\ei"

This binds ESC-i to clear the scrollback buffer and ESC-I to clear both
the screen and the scrollback buffer.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]