summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-10-21 19:29:09 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-10-21 19:29:09 +0000
commit27a317b1687e8ae0983833de0755325b1026bc6d (patch)
tree2420339ab428be299df608ead61aac1a548d4320 /Completion
parentf2081c6bc3d03b8053a559222cb057755d67d7cc (diff)
downloadzsh-27a317b1687e8ae0983833de0755325b1026bc6d.tar.gz
zsh-27a317b1687e8ae0983833de0755325b1026bc6d.tar.xz
zsh-27a317b1687e8ae0983833de0755325b1026bc6d.zip
not quite posted, exactly: improvement to previous _man change
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_man5
1 files changed, 3 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_man b/Completion/Unix/Command/_man
index 89c481239..a3a4d4796 100644
--- a/Completion/Unix/Command/_man
+++ b/Completion/Unix/Command/_man
@@ -25,9 +25,10 @@ _man() {
   (( $#_manpath )) ||
       _manpath=( /usr/man(-/) /(opt|usr)/(pkg|dt|share|X11R6|local)/(cat|)man(-/) )
 
-  if (( $words[(I)-M] )); then
+  integer index=$words[(I)-M]
+  if (( index )); then
     local opt
-    opt=$words[(( $words[(I)-M]+1 ))]
+    opt=$words[index+1]
     _manpath=($_manpath $opt)
   fi