Fix man completion (was broken by recent $UNAME/$USERLAND changes).
This commit is contained in:
parent
e0812c6ac2
commit
65d9348f3e
@ -1008,7 +1008,7 @@ complete -F _insmod $filenames insmod modprobe modinfo
|
|||||||
-o $UNAME = OpenBSD ] &&
|
-o $UNAME = OpenBSD ] &&
|
||||||
_man()
|
_man()
|
||||||
{
|
{
|
||||||
local cur prev sect manpath manext mansect UNAME
|
local cur prev sect manpath manext mansect uname
|
||||||
|
|
||||||
manext="@([0-9lnp]|[0-9][px]|man)?(.@(gz|bz2|lzma))"
|
manext="@([0-9lnp]|[0-9][px]|man)?(.@(gz|bz2|lzma))"
|
||||||
mansect="@([0-9lnp]|[0-9][px])"
|
mansect="@([0-9lnp]|[0-9][px])"
|
||||||
@ -1030,11 +1030,8 @@ _man()
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
UNAME=$( uname -s )
|
uname=$( uname -s )
|
||||||
# strip OS type and version under Cygwin
|
if [[ $uname == @(Linux|GNU|GNU/*|FreeBSD|Cygwin|CYGWIN_*) ]]; then
|
||||||
UNAME=${UNAME/CYGWIN_*/Cygwin}
|
|
||||||
if [ $USERLAND = GNU -o $UNAME = FreeBSD \
|
|
||||||
-o $UNAME = Cygwin ]; then
|
|
||||||
manpath=$( manpath 2>/dev/null || command man --path )
|
manpath=$( manpath 2>/dev/null || command man --path )
|
||||||
else
|
else
|
||||||
manpath=$MANPATH
|
manpath=$MANPATH
|
||||||
|
Loading…
x
Reference in New Issue
Block a user