about summary refs log tree commit diff
path: root/Functions/Completion/__man
blob: a0f00f58b80c703072305ec2cf544fafae11bde4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#function man
setopt localoptions rcexpandparam

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

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