15 lines
511 B
Diff
15 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
|