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