[Fix] system manpages unaccessible

This adds a colon in front of the MANPATH variable, which according to:
`man manpath`
...appends the value to the list determined by the configuration.

Therfore system manpages are still accessible and the nvm manpages are
added.
This commit is contained in:
Moritz Sauter 2019-07-12 17:39:44 +02:00
parent 0b5bb5ccd8
commit 447328b78c

4
nvm.sh
View File

@ -2861,7 +2861,7 @@ nvm() {
if [ "_${MANPATH}" = "_${NEWPATH}" ]; then
nvm_err "Could not find ${NVM_DIR}/*/share/man in \${MANPATH}"
else
export MANPATH="${NEWPATH}"
export MANPATH=":${NEWPATH}"
nvm_echo "${NVM_DIR}/*/share/man removed from \${MANPATH}"
fi
fi
@ -2961,7 +2961,7 @@ nvm() {
MANPATH=$(manpath)
fi
# Change current version
MANPATH="$(nvm_change_path "${MANPATH}" "/share/man" "${NVM_VERSION_DIR}")"
MANPATH=":$(nvm_change_path "${MANPATH}" "/share/man" "${NVM_VERSION_DIR}")"
export MANPATH
fi
export PATH