V Mon, Nov 01, 2021 at 11:44:25AM +1100, Cameron Simpson napsal(a):
> That said, and ignoring the alternate screen, I've noted with annoyance 
> that "clear" in iterm doesn't erase. It seems to scroll up or something; 
> can scroll back to my content. handy for accidents, but when that 
> content came from my password wallet this is not what I want.
> 
For that purposes I added ^[3J sequence into Linux 3.0 which erases not only
whole display but also a scroll-back buffer of the terminal. (Though Linux
4.something removed scrollback buffer completely, you cannot Shift+PgUp
anymore.)

Maybe it's time to send a feature request to a terminal emulator of your
choice to implement it. (I remember xterm's maintainer was not against.)
clear of ncurses emmits it:

$ clear | hexdump -C
00000000  1b 5b 48 1b 5b 32 4a 1b  5b 33 4a                 |.[H.[2J.[3J|
0000000b

Naturaly it should also extend to altearnative screens. As the purpose of the
sequence is to erase all data for security reasons.

-- Petr

Attachment: signature.asc
Description: PGP signature

Reply via email to