mirror of git://git.code.sf.net/p/zsh/code
38993: _man: Drop (b): it's incorrect when $sect contains '|'.
This commit is contained in:
parent
f026a4dc12
commit
a5a9fc7a5f
|
@ -1,5 +1,8 @@
|
|||
2016-08-05 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* 38993: Completion/Unix/Command/_man: Drop (b): it's incorrect
|
||||
when $sect contains '|'.
|
||||
|
||||
* 38991: Src/exec.c, Test/C04funcdef.ztst: Make 'whence -v
|
||||
autoloaded-function' shows the defining filename.
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue