diff options
| author | Peter Stephenson <pws@users.sourceforge.net> | 2010-10-21 19:15:29 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-10-21 19:15:29 +0000 |
| commit | f2081c6bc3d03b8053a559222cb057755d67d7cc (patch) | |
| tree | 6acc99922fadba56cdb5dbe625011568dfef6f6f /Completion/Unix/Command | |
| parent | Jérôme Pouiller: 28351: new help functions (diff) | |
| download | zsh-f2081c6bc3d03b8053a559222cb057755d67d7cc.tar zsh-f2081c6bc3d03b8053a559222cb057755d67d7cc.tar.gz zsh-f2081c6bc3d03b8053a559222cb057755d67d7cc.tar.bz2 zsh-f2081c6bc3d03b8053a559222cb057755d67d7cc.tar.lz zsh-f2081c6bc3d03b8053a559222cb057755d67d7cc.tar.xz zsh-f2081c6bc3d03b8053a559222cb057755d67d7cc.tar.zst zsh-f2081c6bc3d03b8053a559222cb057755d67d7cc.zip | |
Silas Silva: completion support for man -M
Diffstat (limited to 'Completion/Unix/Command')
| -rw-r--r-- | Completion/Unix/Command/_man | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_man b/Completion/Unix/Command/_man index 0820870f2..89c481239 100644 --- a/Completion/Unix/Command/_man +++ b/Completion/Unix/Command/_man @@ -3,6 +3,10 @@ _man() { local dirs expl mrd awk + if (( $words[(I)-M] == (( $CURRENT - 1 )) )); then + _directories && return 0 + fi + if [[ $service == man ]] && (( $words[(I)-l] + $words[(I)--local-file] )); then _files || return 0 fi @@ -21,6 +25,12 @@ _man() { (( $#_manpath )) || _manpath=( /usr/man(-/) /(opt|usr)/(pkg|dt|share|X11R6|local)/(cat|)man(-/) ) + if (( $words[(I)-M] )); then + local opt + opt=$words[(( $words[(I)-M]+1 ))] + _manpath=($_manpath $opt) + fi + # `sman' is the SGML manual directory for Solaris 7. # 1M is system administrator commands on SVR4 |
