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

setopt localoptions rcexpandparam

local rep expl

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

_description expl 'manual page'
(( $#rep )) && compadd "$expl[@]" - $rep