I want to understand the use of xargs man
in Rampion\'s code:
screen -t man /bin/sh -c \'xargs man || read\'
Thanks to Ram
No, I don't cat
nothing. I cat whatever input I get after I run the command. cat
is actually extraneous here, so let's ignore it.
xargs man
waits on user input. Which is necessary. Since in the script you grabbed that from, I can't paste in the argument for man until after I create the window. So the command that runs in the window needs to wait for me to give it something, before it tries to run man.
If we just ran screen /bin/sh -d 'man || read'
, it would always complain "What manual page do you want?" since we never told it.