home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Unix / Shells / zsh / Source / func / run-help < prev    next >
Encoding:
Paul Falstad's zsh script  |  1993-01-31  |  376 b   |  18 lines

  1. #! /bin/zsh
  2. # zsh script to peruse the help directory
  3. #
  4. if [[ $1 = "-l" ]]; then
  5.   if [[ ${HELPDIR:-} != "" ]]; then
  6.     echo 'Here is a list of topics for which help is available:'
  7.     echo ""
  8.     ls $HELPDIR
  9.   else
  10.     echo 'There is no help available at this time'
  11.   fi
  12. elif [[ ${HELPDIR:-} != "" && -r $HELPDIR/$1 ]]
  13. then
  14.     ${PAGER:-more} $HELPDIR/$1
  15. else
  16.     man $1
  17. fi
  18.