about summary refs log tree commit diff
path: root/Completion/User/_man
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/User/_man')
-rw-r--r--Completion/User/_man10
1 files changed, 4 insertions, 6 deletions
diff --git a/Completion/User/_man b/Completion/User/_man
index 8ae64e239..ebe9a432e 100644
--- a/Completion/User/_man
+++ b/Completion/User/_man
@@ -1,6 +1,6 @@
 #compdef man
 
-setopt localoptions rcexpandparam extendedglob
+setopt localoptions rcexpandparam
 
 local rep expl star approx
 
@@ -14,14 +14,12 @@ 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/(sman|man|cat)${words[2]}/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t) )
+  $manpath/(man|cat)${words[2]}/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t:r) )
 else
-  rep=( $manpath/(sman|man|cat)*/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t) )
+  rep=( $manpath/(man|cat)*/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t:r) )
 fi
 
 _description expl 'manual page'
-(( $#rep )) && compadd "$expl[@]" - ${rep%%.[^.]##(.gz|)}
+(( $#rep )) && compadd "$expl[@]" - $rep