I have a node process and several man pages. When a user types in something like exe subcommand --help
it should run man subcommand
for them.
The closest I've been able to get is
man = spawn("man", ["fire-" + fireargs[1]], {
detached: true,
stdio: "inherit",
});
I've also tried adding man.unref()
but this doesn't seem to make a huge difference. This will display the man page, but it doesn't work very well and certain keys like Page Down don't actually scroll the page (but j
will).
Is there a way to display pager output like from man
using node's child_process?