1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00

53866: fix _man for NetBSD

This commit is contained in:
Jun-ichi Takimoto 2025-08-28 09:15:08 +09:00
parent 9e01ede43f
commit 7d4fc84519
2 changed files with 9 additions and 3 deletions

View file

@ -1,8 +1,11 @@
2025-08-28 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 53866: Completion/Unix/Command/_man: fix _man for NetBSD
2025-08-24 Eric Cook <llua@gmx.com> 2025-08-24 Eric Cook <llua@gmx.com>
* unposted: Config/version.mk: Test release: zsh-5.9.0.3-test. * unposted: Config/version.mk: Test release: zsh-5.9.0.3-test.
2025-08-16 dana <dana@dana.is> 2025-08-16 dana <dana@dana.is>
* 53808: Doc/Zsh/expn.yo: clarify Yn globqual explanation * 53808: Doc/Zsh/expn.yo: clarify Yn globqual explanation

View file

@ -169,9 +169,12 @@ _man() {
typeset -gHA _manpath_cache typeset -gHA _manpath_cache
fi fi
if [[ -z $_manpath_cache[$MANPATH] ]]; then if [[ -z $_manpath_cache[$MANPATH] ]]; then
local mp local -aU mp
if [[ $variant == netbsd* ]]; then if [[ $variant == netbsd* ]]; then
mp=( ${(s.:.)$(command man -p 2>/dev/null)} ) # 'man -p' gives a newline-separatd list of
# /usr/pkg/man/man1 /usr/share/man/man8/amd64 etc.
# Here we just remove the trailing /man1 or /man8/amd64 etc.
mp=( ${${(f)"$(command man -p 2>/dev/null)"}%%/man/*}/man )
elif [[ $variant != freebsd* ]]; then elif [[ $variant != freebsd* ]]; then
mp=( ${(s.:.)$(command man -w 2>/dev/null)} ) mp=( ${(s.:.)$(command man -w 2>/dev/null)} )
fi fi