[Home] Zsh logo

manwhence

Zsh Wizard

Download manwhence Return to Examples
  1. #!/bin/zsh
  2. #
  3. # manwhence - searches for an entry in the manpath.
  4. #
  5. # usage:
  6. # manwhence command . . .
  7. #
  8. local name
  9. # Get a manpath if there isn't one already set.
  10. [[ ${+MANPATH} -eq 0 ]] && local MANPATH="`manpath`"
  11. # Search the path for a man?/name.* file
  12. for name
  13. gwhence -s "${MANPATH-$(manpath)}" -m '{man,cat}?/'"$name"'.*'