mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 14:21: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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user