man: --path option is supported on Darwin (Alioth: #313584)

This commit is contained in:
Igor Murzov 2012-03-25 17:28:42 +04:00
parent 199a63bd4d
commit fb2d657fac

View File

@ -8,7 +8,7 @@ _man()
local cur prev words cword split local cur prev words cword split
_init_completion -s -n : || return _init_completion -s -n : || return
local i sect manpath manext mansect uname local i sect manpath manext mansect
manext="@([0-9lnp]|[0-9][px]|man|3pm)?(.@([gx]z|bz2|lzma|Z))" manext="@([0-9lnp]|[0-9][px]|man|3pm)?(.@([gx]z|bz2|lzma|Z))"
mansect="@([0-9lnp]|[0-9][px]|3pm)" mansect="@([0-9lnp]|[0-9][px]|3pm)"
@ -56,8 +56,7 @@ _man()
return 0 return 0
fi fi
uname=$( uname -s ) if [[ $OSTYPE == *@(darwin|linux|freebsd|cygwin)* ]] || _userland GNU; then
if [[ $uname == @(Linux|GNU|GNU/*|FreeBSD|Cygwin|CYGWIN_*) ]]; then
manpath=$( manpath 2>/dev/null || command man --path ) manpath=$( manpath 2>/dev/null || command man --path )
else else
manpath=$MANPATH manpath=$MANPATH