问题
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.
回答1:
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 -
来源:https://stackoverflow.com/questions/27802024/display-man-page-from-stdin