Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display man page from stdin

I am developing a man page using rst. While I am doing that, I would like a quick way of displaying my end result. I currently do it like this:

rst2man < the-man-page.rst > tmp
man ./tmp

Is there a way to do this with a one liner without creating a temporary file? I have tried to pipe the output directly to the man command.

like image 889
toftis Avatar asked Sep 29 '22 01:09

toftis


1 Answers

You can use the --local-file argument of the man command and specify - to read from stdin.

Example:

rst2man < the-man-page.rst | man -l -
like image 167
Jonny Heggheim Avatar answered Oct 08 '22 10:10

Jonny Heggheim