summaryrefslogtreecommitdiffstats
path: root/Completion/User/_man
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-09 11:22:47 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-09 11:22:47 +0000
commit6e873b4fec9df1d9cefec71098d3045a03088c52 (patch)
tree5fe4e16f66c5a2a8a73ecdf6255ab645f8c9658f /Completion/User/_man
parentzsh-workers/7739 (diff)
downloadzsh-6e873b4fec9df1d9cefec71098d3045a03088c52.tar
zsh-6e873b4fec9df1d9cefec71098d3045a03088c52.tar.gz
zsh-6e873b4fec9df1d9cefec71098d3045a03088c52.tar.bz2
zsh-6e873b4fec9df1d9cefec71098d3045a03088c52.tar.lz
zsh-6e873b4fec9df1d9cefec71098d3045a03088c52.tar.xz
zsh-6e873b4fec9df1d9cefec71098d3045a03088c52.tar.zst
zsh-6e873b4fec9df1d9cefec71098d3045a03088c52.zip
zsh-workers/7740
Diffstat (limited to 'Completion/User/_man')
-rw-r--r--Completion/User/_man10
1 files changed, 6 insertions, 4 deletions
diff --git a/Completion/User/_man b/Completion/User/_man
index ebe9a432e..8ae64e239 100644
--- a/Completion/User/_man
+++ b/Completion/User/_man
@@ -1,6 +1,6 @@
#compdef man
-setopt localoptions rcexpandparam
+setopt localoptions rcexpandparam extendedglob
local rep expl star approx
@@ -14,12 +14,14 @@ if [[ -n $_comp_correct ]]; then
approx="(#a${_comp_correct})"
fi
+# `sman' is the SGML manual directory for Solaris 7.
+
if [[ $words[2] = (<->*|ln) ]]; then
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
- rep=( $manpath/(man|cat)*/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t:r) )
+ rep=( $manpath/(sman|man|cat)*/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t) )
fi
_description expl 'manual page'
-(( $#rep )) && compadd "$expl[@]" - $rep
+(( $#rep )) && compadd "$expl[@]" - ${rep%%.[^.]##(.gz|)}