void-packages/srcpkgs/bash-completion/patches/openbsd-man.patch

15 lines
511 B
Diff
Raw Normal View History

2014-10-01 12:39:18 +02:00
--- completions/man.orig
+++ completions/man
@@ -57,7 +57,10 @@ _man()
fi
local manpath
- if [[ $OSTYPE == *@(darwin|linux|freebsd|cygwin)* ]] || _userland GNU; then
+ if [[ -r /etc/man.conf ]]; then
+ manpath=$(eval echo $(awk '/_default/ { print $2 }' /etc/man.conf))
+ manpath=${manpath// /:}
+ elif [[ $OSTYPE == *@(darwin|linux|freebsd|cygwin)* ]] || _userland GNU; then
manpath=$( manpath 2>/dev/null || command man --path )
else
manpath=$MANPATH