Differences between revisions 2 and 3
Revision 2 as of 2008-04-12 20:39:05
Size: 1052
Editor: MarkHobley
Comment: Preventing the manual pager from clearing the screen
Revision 3 as of 2009-03-16 03:33:52
Size: 1052
Editor: anonymous
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 29: Line 29:
["ManPage"] [[ManPage]]

Preventing the manual pager from clearing the screen

When the man pager has displayed a manpage, and the q key is used to exit the program, the screen is cleared. It is possible to revert the manpager to its legacy behaviour, leaving the tail end of the manpage on the display.

This occurs because the less pager provides a terminal initialization function, and can be configured to redraw the screen back to the way it was before the pager was used:

  • less foobar.doc # The screen is cleared when the pager exits less -X foobar.doc # The screen is preserved when the pager exits

man.conf

It is possible to change the behaviour of the man pager by modifying the /etc/man.conf configuration file as follows:

Configuration of the less pager

It is also possible to change the behaviour of the less pager as follows:

  • LESS='-X' export LESS

More or Less

It is possible to use more as the page viewer, rather than less, as follows:

  • export PAGER=more

See also

ManPage