Thursday, January 4, 2018
Tip Add color to man pages with most on FreeBSD
Tip Add color to man pages with most on FreeBSD
man pages are formatted using FreeBSD less and more utilities which display text in blank and white colors. most on the other hand introduces the ability to view man pages formatted with colors.
most is a pager (like less and more) that displays, one windowful at a time, the contents of a file on a terminal. It pauses after each windowful and prints the following on the window status line: the screen, the file name, current line number, and the percentage of the file so far displayed.
Lets install most:
- % su
- # cd /usr/ports/sysutils/most
- # make install clean
- # rehash
- # exit
- % setenv PAGER most
- % export PAGER=most
As most is a third party application Id suggest that you dont use it as the default pager for the root account. Im sure you dont want to find yourself in single user mode with only the root partition mounted and realize that your .cshrc defines most has the pager ;)