diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-10-21 19:29:09 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-10-21 19:29:09 +0000 |
commit | 27a317b1687e8ae0983833de0755325b1026bc6d (patch) | |
tree | 2420339ab428be299df608ead61aac1a548d4320 | |
parent | f2081c6bc3d03b8053a559222cb057755d67d7cc (diff) | |
download | zsh-27a317b1687e8ae0983833de0755325b1026bc6d.tar.gz zsh-27a317b1687e8ae0983833de0755325b1026bc6d.tar.xz zsh-27a317b1687e8ae0983833de0755325b1026bc6d.zip |
not quite posted, exactly: improvement to previous _man change
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Completion/Unix/Command/_man | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog index 15fb38747..1a8d7d786 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2010-10-21 Peter Stephenson <p.w.stephenson@ntlworld.com> - * Silas Silva: users/15464: Completion/Unix/Command/_man: - support for -M argument. + * Silas Silva (with minor improvement): users/15464: + Completion/Unix/Command/_man: support for -M argument. 2010-10-18 Peter Stephenson <pws@csr.com> @@ -13773,5 +13773,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5110 $ +* $Revision: 1.5111 $ ***************************************************** 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 |