diff options
Diffstat (limited to 'Completion/Unix/Command/_man')
-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)) |