Hacker News new | past | comments | ask | show | jobs | submit login

One advantage I find of more over less, is that it doesn't clear the terminal on exit. It's often nice to see what you have looked at above the command prompt. There is a "-X" option for less, but this also breaks mouse wheel scrolling.



Those horrid alt-buffer init and exit strings in terminfo and termcap are the bane of my existence. I almost never want that behavior, particularly when I've got a relevant section of a man page on the screen and want it to STAY THERE when I quit out of the pager. I use -X in less, but I really want a more universal solution, so I use a terminal type that doesn't have those strings, usually xterm-noapp. But it's not always available.

I'm not sure what you mean about -X and mouse scrolling.


Put something like this into your .Xresources:

For URxvt:

! Ctrl-Shift-A will show alternate screen URxvt.keysym.C-S-A: command:\033[?47h ! Ctrl-Shift-Z will return to regular screen URxvt.keysym.C-S-Z: command:\033[?47l

For XTerm:

! Ctrl-Shift-Z will toggle alternate screen VT100translations: #override \n\ Ctrl Shift <KeyPress> z: set-altscreen(toggle)




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: