[comp.sys.ibm.pc] MKS toolkit help command explored and documented.

jls@killer.DALLAS.TX.US (Jerome Schneider) (11/02/88)

 
The MKS toolkit "help" command has two lightly documented options for
adding auxiliary help information that are a bit tricky to use.

When "help foo" is issued, help first looks for a file /usr/man/man1/foo.1
and if found, searches it for a line with a ".HS" in column 1.  The file
contents after this line is output, using a --more-- format until either
eof or a ".HE" in column 1 is found.   Although not documented, the .HS
and .HE are text formatting macros from MKS's documentors workbench kit, 
and do something like HEADER START and HEADER END respectively.

Next, if the foo.1 man page file was not found,  /etc/helpfile is searched
for a line beginning with a "# foo" and text is output up to the next line
beginning with a #.  

Finally, if foo is still not found, help looks for a $HELP variable that
should point to a directory containing additional helpfile and helpinde
files.  You must remember to EXPORT the $HELP when you define it, since 
the help command will be executed in a sub-shell that can not see shell
variables that are not exported to the environment.  (Its obvious after
you scratch your head for a bit when the auxiliary HELP file can't be 
found :-) ).

Using this information, I have "added" option information and man pages
for many non-MKS programs and utilities to the help facility.  It saves
me a lot of manual flipping for those seldom used utilities, etc.