Closed jdowner closed 5 years ago
If vim is used as the pager, cppman prints the following message to the terminal when a page is closed,
Vim: Reading from stdin...
This is an issue in vim that is related to piping content through stdin. There is a flag that can be used in v8.0+ of vim to prevent this text,
echo "foo" | vim - --not-a-term
But this will not work for users with an older version of vim, and I suspect there are a lot of people who are still using older versions.
There is a work-around that works for older versions,
echo "foo" | vim </dev/tty <(cat)
However, this does not work when invoked from within the python interpreter.
Thanks for pointing this out. I created a fix for it.
If vim is used as the pager, cppman prints the following message to the terminal when a page is closed,
Vim: Reading from stdin...
This is an issue in vim that is related to piping content through stdin. There is a flag that can be used in v8.0+ of vim to prevent this text,
echo "foo" | vim - --not-a-term
But this will not work for users with an older version of vim, and I suspect there are a lot of people who are still using older versions.
There is a work-around that works for older versions,
echo "foo" | vim </dev/tty <(cat)
However, this does not work when invoked from within the python interpreter.