Fix the problem that messes up MANPATH. Issue 393

This commit is contained in:
zodiacg 2014-05-01 23:12:32 +08:00
parent a69eae10e3
commit 605dd1092f

2
nvm.sh
View File

@ -451,7 +451,7 @@ nvm() {
if [ -z "$MANPATH" ]; then if [ -z "$MANPATH" ]; then
MANPATH=$(manpath) MANPATH=$(manpath)
fi fi
MANPATH=${MANPATH#*$NVM_DIR/*/man:} MANPATH=${MANPATH%$NVM_DIR/*/share/man*}${MANPATH#*$NVM_DIR/*/share/man:}
if [ `expr "$MANPATH" : ".*$NVM_DIR/.*/share/man"` != 0 ]; then if [ `expr "$MANPATH" : ".*$NVM_DIR/.*/share/man"` != 0 ]; then
MANPATH=${MANPATH%$NVM_DIR/*/share/man*}$NVM_DIR/$VERSION/share/man${MANPATH#*$NVM_DIR/*/share/man} MANPATH=${MANPATH%$NVM_DIR/*/share/man*}$NVM_DIR/$VERSION/share/man${MANPATH#*$NVM_DIR/*/share/man}
else else