Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!zsh -f
- # manpath: my short zsh script to search for man pages whose names contain
- # that argument. Searches all the directories named in your
- # "manpath" environment variable.
- [[ ! -o nonomatch ]] && setopt nonomatch
- if (($# == 0))
- then
- echo $manpath | tr " " "\012"
- else
- for dir in $manpath
- do
- for subdir in $dir/man* $dir/cat*
- do
- /bin/ls -l $subdir/*$1*
- done
- done |& egrep -v '([Nn]o(t found| such|t a))'
- fi
Advertisement
Add Comment
Please, Sign In to add comment