about summary refs log tree commit diff
path: root/Completion/User/_man
blob: cd1badc4d9db32e325a662edf7d4c19b386aae9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#defcomp 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