diff options
| author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2016-08-04 15:54:23 +0000 |
|---|---|---|
| committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2016-08-05 12:37:27 +0000 |
| commit | a5a9fc7a5fc50db278f7d17eb8d2ae78f3edc768 (patch) | |
| tree | 70088be297f5e798b4195d68a9a0ae689a874b89 /Completion/Unix/Command/_man | |
| parent | 38991: Make 'whence -v autoloaded-function' shows the defining filename. (diff) | |
| download | zsh-a5a9fc7a5fc50db278f7d17eb8d2ae78f3edc768.tar zsh-a5a9fc7a5fc50db278f7d17eb8d2ae78f3edc768.tar.gz zsh-a5a9fc7a5fc50db278f7d17eb8d2ae78f3edc768.tar.bz2 zsh-a5a9fc7a5fc50db278f7d17eb8d2ae78f3edc768.tar.lz zsh-a5a9fc7a5fc50db278f7d17eb8d2ae78f3edc768.tar.xz zsh-a5a9fc7a5fc50db278f7d17eb8d2ae78f3edc768.tar.zst zsh-a5a9fc7a5fc50db278f7d17eb8d2ae78f3edc768.zip | |
38993: _man: Drop (b): it's incorrect when $sect contains '|'.
Diffstat (limited to 'Completion/Unix/Command/_man')
| -rw-r--r-- | Completion/Unix/Command/_man | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_man b/Completion/Unix/Command/_man index e892bb263..ef17ad8ee 100644 --- a/Completion/Unix/Command/_man +++ b/Completion/Unix/Command/_man @@ -37,7 +37,10 @@ _man() { mrd=(${^_manpath/\%L/${LANG:-En_US.ASCII}}/mandb(N)) - # $sect is from the command line, the "3p" in "man 3p memcpy" + # $sect is from the command line, the "3p" in "man 3p memcpy". + # It may also be a |-joined (and later in the code "()"-enclosed) list of + # section names. + # TODO: disentangle this to always be an array. # $sect_dirname is from the filesystem, the "3" in "/usr/share/man/man3" # These are used by _man_pages local sect sect_dirname @@ -117,7 +120,7 @@ _man_pages() { fi pages=( ${(M)dirs:#*$sect_dirname/} ) - compfiles -p pages '' '' "$matcher" '' dummy "*${(b)sect}*" + compfiles -p pages '' '' "$matcher" '' dummy "*${sect}*" pages=( ${^~pages}(N:t) ) (($#mrd)) && pages[$#pages+1]=($(awk $awk $mrd)) |
