parsed.org
Man Page Completion by cygnus on Dec 31, 2005 04:13 PM

You can complete man page names as well as file names. Put these lines in your ~/.zshrc:

setopt SH_WORD_SPLIT
function man_var () {
   man_pages=( /usr/share/man*/*(N:t:r:r) )
   compctl -k man_pages man
   reply=( $man_pages )
}
compctl -K man_var man; man_pages=()

Now type man foo and the hit TAB to get a list of all man pages beginning with foo.

(Note: this tip taken essentially verbatim [after testing and fixing] from http://www.unixtips.org/index.php3?catList=30.)

autocompleteextrasmanpageszsh
RSS