How can I force the man command to not use a pager, and instead output the whole manpage at once and keep all highlighting?
If I use man -P cat or man | cat, I lose highlighting.
feedback
|
This question came from our site for professional and enthusiast programmers.
|
Long reading of manuals for man, less, groff and grotty finally gave me answer Highlighting by default is made using backspace sequences: Pager can be set in many ways:
| |||
|
feedback
|
Which means the pager is regulated by PAGER env. variable, Thus just define PAGER as
and enjoy. | |||||||||
feedback
|
|
Alternatively, there's always the
| |||||
feedback
|
|
This is not exactly what you want (you won't get the output in the console) but you could generate a dvi file with the content of a manual as explained in man's man:
I've just tested this and opened the dvi file with evince: the highlighting is not lost. | |||
|
feedback
|