diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2016-01-14 15:37:43 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2016-01-18 02:40:02 +0000 |
commit | 896f43c72bcfd3f1e2240f54609868634a3c4e45 (patch) | |
tree | 82ba8cd93a9e8e176d75355a2fc06242d7d92016 /Completion/Unix | |
parent | 35b8e8794f00987b4b9380f5f20f6ca6ec64b7c3 (diff) | |
download | zsh-896f43c72bcfd3f1e2240f54609868634a3c4e45.tar.gz zsh-896f43c72bcfd3f1e2240f54609868634a3c4e45.tar.xz zsh-896f43c72bcfd3f1e2240f54609868634a3c4e45.zip |
37634: _man: Support subsection names such as '3p'.
Diffstat (limited to 'Completion/Unix')
-rw-r--r-- | Completion/Unix/Command/_man | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_man b/Completion/Unix/Command/_man index 871af4854..0534db753 100644 --- a/Completion/Unix/Command/_man +++ b/Completion/Unix/Command/_man @@ -52,7 +52,7 @@ _man() { fi if [[ $sect = (<->*|1M|l|n) || $sect = \(*\|*\) ]]; then - dirs=( $^_manpath/(sman|man|cat)${~sect}/ ) + dirs=( $^_manpath/(sman|man|cat)${~sect%%[^0-9]#}/ ) awk="\$2 == \"$sect\" {print \$1}" else dirs=( $^_manpath/(sman|man|cat)*/ ) @@ -111,7 +111,7 @@ _man_pages() { fi pages=( ${(M)dirs:#*$sect_dirname/} ) - compfiles -p pages '' '' "$matcher" '' dummy "*" + compfiles -p pages '' '' "$matcher" '' dummy "*${(b)sect}*" pages=( ${^~pages}(N:t) ) (($#mrd)) && pages[$#pages+1]=($(awk $awk $mrd)) |