mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-11 06:41:50 +00:00
[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:
parent
0b5bb5ccd8
commit
447328b78c
4
nvm.sh
4
nvm.sh
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user