]> Sergey Matveev's repositories - dotfiles.git/blobdiff - zsh/.zshrc
Complete man pages
[dotfiles.git] / zsh / .zshrc
index 4aa6a4ff9c01b87016eaa5bbfc87710b754ddf1e..0756acccf4c46ebd56138eff6ad1fa52018fcd75 100644 (file)
@@ -152,7 +152,8 @@ alias zc="zcalc"
 zstyle ":completion:*:functions" ignored-patterns "_*"
 zstyle ":completion:*" matcher-list "" 'm:{a-z\-}={A-Z\_}' 'r:|?=** m:{a-z\-}={A-Z\_}'
 _mycomp () {
-    [ $CURRENT -eq 1 ] && _command_names || _files && return 0
+    [ "$words[1]" != "man" ] || { _man && return 0 }
+    [ $CURRENT -eq 1 ] && _command_names ||  _files && return 0
     # MAGIC_EQUAL_SUBST {{{
     [[ "$PREFIX" = *\=* ]] || return 1
     compstate[parameter]="${PREFIX%%\=*}"