x_x icon indicating copy to clipboard operation
x_x copied to clipboard

Use alternate screen to avoid spamming terminal

Open oxguy3 opened this issue 9 years ago • 1 comments

Right now, all of x_x's output goes to the normal terminal screen, which means that anything that existed in the terminal history before the user ran x_x is completely gone. A solution to this is to have x_x write everything to the alternate screen. The alternate screen is how programs like vim and top manage to avoid spamming the screen. You enable the alternate screen simply by printing an ANSI escape sequence. Here's a basic guide: http://rosettacode.org/wiki/Terminal_control/Preserve_screen#Python

oxguy3 avatar Dec 17 '15 16:12 oxguy3

Thats interesting. This program displays the output in less. Looks like the -X switch does this, so it might be worth removing that.

kristianperkins avatar Dec 18 '15 02:12 kristianperkins