void-packages/srcpkgs/bash-completion/patches/openbsd-man.patch
2014-10-01 10:41:47 +00:00

14 lines
511 B
Diff

--- 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