diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2000-07-19 09:03:29 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2000-07-19 09:03:29 +0000 |
commit | 6ce73cf6f5b20598af72a492ea2e0736f880d869 (patch) | |
tree | 902861edd8e5d662fc91d2154cb7fb5f7e110a51 /Completion/User | |
parent | 67f16de104da5af502bf47b63ed83f981fa28739 (diff) | |
download | zsh-6ce73cf6f5b20598af72a492ea2e0736f880d869.tar.gz zsh-6ce73cf6f5b20598af72a492ea2e0736f880d869.tar.xz zsh-6ce73cf6f5b20598af72a492ea2e0736f880d869.zip |
12308: Andrej and pws: _man formats, again
Diffstat (limited to 'Completion/User')
-rw-r--r-- | Completion/User/_man | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Completion/User/_man b/Completion/User/_man index 68ec12679..2dae425ee 100644 --- a/Completion/User/_man +++ b/Completion/User/_man @@ -30,13 +30,16 @@ fi mrd=(${^manpath/\%L/${LANG:-En_US.ASCII}}/mandb(N)) if [[ $words[2] = (<->*|1M|l|n) ]]; then rep=( - $manpath/(sman|man|cat)${words[2]}/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t) ) + $manpath/(sman|man|cat)${words[2]}/${~approx}$PREFIX${~star}$SUFFIX.*(N:t) ) (($#mrd)) && rep[$#rep+1]=($(awk "\$2 == \"$words[2]\" {print \$1}" $mrd)) else - rep=( $manpath/(sman|man|cat)*/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t) ) + rep=( $manpath/(sman|man|cat)*/${~approx}$PREFIX${~star}$SUFFIX.*(N:t) ) (($#mrd)) && rep[$#rep+1]=($(awk '{print $1}' $mrd)) fi +# Remove any compression suffix, then remove the minimum possible string +# beginning with .<->: that handles problem cases like files called +# `POSIX.1.5'. (( $#rep )) && _wanted manuals expl 'manual page' \ - compadd - ${rep%%.[^.]##(.gz|.bz2|)} + compadd - ${${rep%%.(bz2|z|gz|Z)}%.<->*} |