shell script implementation of man

Loïc Grenié loic.grenie at gmail.com
Wed Nov 19 14:24:57 UTC 2008


2008/11/19, Matthew Hiles <matthew.hiles at gmail.com>:
> So I saw this in the TODO file:
>
>  >man
>  >  It would be nice to have a man command.  Not one that handles troff or
>  >  anything, just one that can handle preformatted ascii man pages, possibly
>  >  compressed.  This could probably be a script in the extras directory that
>  >  calls cat/zcat/bzcat | less
>  >
>  >  (How doclifter might work into this is anybody's guess.)
>
>
>  So here is my first test version. I've verified it works with busybox 1.13.
>  Obviously it can be trimmed down some to save space and needs proper
>  legal wordage.

    Native French speaking: you could handle LANG and/or -L option (maybe
  not) !

    As for /usr/local/man, I suggest using a DEFAULT_MANPATH
  variable (or whatever name you wish to use) as follows:

DEFAULT_MANPATH=/usr/local/man

if [ -z "$MANPATH" ]; then
       echo "Warning: MANPATH is not set, assuming $DEFAULT_MANPATH." >&2
       MANPATH="$DEFAULT_MANPATH"
fi

  Additionally, I think it would be better to put quotes around $MANPATH.

      Cheers,

            Loïc



More information about the busybox mailing list