Merge pull request #278 from frasertweedale/fix/manpath

fix MANPATH generation on FreeBSD
master
Jordan Harband 2013-12-23 10:11:06 -08:00
commit 8df2dd2ba8
1 changed files with 4 additions and 0 deletions

4
nvm.sh
View File

@ -407,6 +407,10 @@ nvm() {
else else
PATH="$NVM_DIR/$VERSION/bin:$PATH" PATH="$NVM_DIR/$VERSION/bin:$PATH"
fi fi
if [ -z "$MANPATH" ]; then
MANPATH=$(manpath)
fi
MANPATH=${MANPATH#*$NVM_DIR/*/man:}
if [[ $MANPATH == *$NVM_DIR/*/share/man* ]]; then if [[ $MANPATH == *$NVM_DIR/*/share/man* ]]; 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