From 27a317b1687e8ae0983833de0755325b1026bc6d Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 21 Oct 2010 19:29:09 +0000 Subject: not quite posted, exactly: improvement to previous _man change --- Completion/Unix/Command/_man | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Completion') 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 -- cgit 1.4.1