mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-28 05:00:59 +01:00
zsh-workers/7740
This commit is contained in:
parent
c9cc736127
commit
6e873b4fec
1 changed files with 6 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
#compdef man
|
#compdef man
|
||||||
|
|
||||||
setopt localoptions rcexpandparam
|
setopt localoptions rcexpandparam extendedglob
|
||||||
|
|
||||||
local rep expl star approx
|
local rep expl star approx
|
||||||
|
|
||||||
|
|
@ -14,12 +14,14 @@ if [[ -n $_comp_correct ]]; then
|
||||||
approx="(#a${_comp_correct})"
|
approx="(#a${_comp_correct})"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# `sman' is the SGML manual directory for Solaris 7.
|
||||||
|
|
||||||
if [[ $words[2] = (<->*|ln) ]]; then
|
if [[ $words[2] = (<->*|ln) ]]; then
|
||||||
rep=(
|
rep=(
|
||||||
$manpath/(man|cat)${words[2]}/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t:r) )
|
$manpath/(sman|man|cat)${words[2]}/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t) )
|
||||||
else
|
else
|
||||||
rep=( $manpath/(man|cat)*/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t:r) )
|
rep=( $manpath/(sman|man|cat)*/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t) )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_description expl 'manual page'
|
_description expl 'manual page'
|
||||||
(( $#rep )) && compadd "$expl[@]" - $rep
|
(( $#rep )) && compadd "$expl[@]" - ${rep%%.[^.]##(.gz|)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue