about summary refs log tree commit diff
path: root/Completion/User/_man
blob: 1a175506c93eecbd4e04b41c9668bad6b22f9916 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#compdef man

setopt localoptions rcexpandparam

local rep

if [[ $words[2] = (<->*|ln) ]]; then
  rep=( $manpath/(man|cat)${words[2]}/$PREFIX*$SUFFIX.<->*(N:t:r) )
else
  rep=( $manpath/(man|cat)*/$PREFIX*$SUFFIX.<->*(N:t:r) )
fi

(( $#rep )) && compadd - $rep