[Unix] bar man from clearing the display after quitting
There's one thing I always wanted to do, but actually never came into my mind when I had the time: Try to find a way to bar man from beginning a new page on Terminal after quitting.
It is such an annoyance: You just found the correct example for your kind of problem, press q and everything is deleted. Sure, I began to copy and paste it, but I can't learn something I didn't type on my own. So I remembered it.
But once you tried to remember things like:
find / \( -newer ttt -or -user wnj \) -print
you begin to wonder whether there is a better way.
And yes, there is! Thanks to Chandan, or precisely, thanks to the comment from Tero:
"That's actually an annoying feature caused by the default pager (less). Clearing up the screen can be disabled by adding -X into its default parameters. I have following in my .bashrc to disable it globally:
export LESS=-Xc
Here's the explanation from man page:
-X or --no-init
Disables sending the termcap initialization and deinitialization strings to the terminal. This is sometimes desirable if the deinitialization string does something unnecessary, like clearing the screen.
Another option I use is -c which makes scrolling a bit more smooth."
Well, I can't see any difference made by the -c switch, the drawing is too fast, but maybe I'll see it the first time I'm using less on my iBook through a 28.8kbit Modem connection (whenever this might happen).
Anyway, thanks Chandan for bringing up the topic and Tero for the solution.


0 Comments:
Post a Comment
<< Home