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/_man6
1 files changed, 3 insertions, 3 deletions
diff --git a/Completion/User/_man b/Completion/User/_man
index 8204fba0b..67d59f24a 100644
--- a/Completion/User/_man
+++ b/Completion/User/_man
@@ -2,10 +2,10 @@
 setopt localoptions rcexpandparam
 
 local rep
-if [[ $2 = (<->*|ln) ]]; then
-  rep=( $manpath/(man|cat)$2/$PREFIX*$SUFFIX.<->*(N:t:r) )
+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 -m $rep
+(( $#rep )) && compadd - $rep