Display man page from stdin

2019-06-27 03:48发布

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条回答
叼着烟拽天下
2楼-- · 2019-06-27 04:34

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 -
查看更多
登录 后发表回答