A request to segregate man pages for shell built-ins
vogelke at pobox.com
Wed Oct 25 21:09:47 UTC 2017
On Wed, Oct 25, 2017 at 07:14:28AM +0100, Matthew Seaman wrote:
> I'm sure creating separate man pages is possible: it's just a question
> of someone stepping up and doing the work.
Here's a "solution" from the baling-twine-and-ductape school of coding.
I ran "compgen -b" under bash and got a list of builtins:
A little vi:
help . > dot.1
help : > :.1
help [ > [.1
help alias > alias.1
help unalias > unalias.1
help unset > unset.1
help wait > wait.1
Run "strings" on /path/to/man and find the default MANSECT. Stick all
these files under /usr/local/man/cat1b and give it a test-drive:
#<myman: quick manpage test
case "$1" in
.) page=dot ;;
*) page=$1 ;;
You could do something just as hideous for ksh/tcsh/whatever and put
the results under separate sections. In one of your login dotfiles:
case "$SHELL" in
*bash) add="1b" ;;
*csh) add="1c" ;;
*zsh) add="1z" ;;
... I'll show myself out.
Karl Vogel I don't speak for the USAF or my company
You're the type of guy who'd give a Rubik's Cube to Forrest Gump.
--Local DJ, station Z93
More information about the freebsd-questions