Display man page from stdin

不羁的心 提交于 2019-12-10 17:33:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!