Hi John, > > The locations vary, e.g. a user's $MANPATH. Have the user specify > > it? > > That won't help... when I said how "*(NodeJS) shells out to the system > to locate manpages for display/processing"*, I was mainly referring to > how Node talks to the system's man(1), asking it where the pages are > located that address a user-specified topic, etc. Or if the user wants > to run `apropos` and get a search rolling, it need to know what to run > / what arguments to pass to locate manpages.. :(
It seems the tail's wagging the dog for that to hold things up. Implement something that works on a common platform or two and have user's of others come forward with their solution for their platform. `Good enough', not perfect. One approach is to run several attempts of common command and option combinations until a good exit status with reasonable looking output is seen, e.g. man(1), whatis(1), apropos(1), whereis(1). If all those fail, punt to a simple search of $MANPATH. -- Cheers, Ralph. https://plus.google.com/+RalphCorderoy