On Tue, Nov 02, 2021 at 07:10:24PM +0100, Petr Pisar wrote: > V Mon, Nov 01, 2021 at 11:44:25AM +1100, Cameron Simpson napsal(a): > 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.
No that's not "natural." The whole point of having alternative screens is to retain the data on one while you do work in the other. If you want the alternate screen cleared, clear it. If worse comes to worst, close the terminal. A command-line option to clear might be nice to make this easy for the user, but it should not be the default behavior. Then if it really is what you want, all the time, you can just make a shell alias: alias clear="clear --clear-alternate-screen-also" -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience.
signature.asc
Description: PGP signature