0
0
mirror of https://github.com/tj/n.git synced 2024-11-21 18:48:57 +01:00

List the old and new locations when change location, one-off situation, give lots of detail

This commit is contained in:
John Gee 2019-11-16 16:24:44 +13:00
parent 4c76c422c3
commit 3104e958f1

2
bin/n
View File

@ -571,6 +571,8 @@ activate() {
# Extra tips for changed location.
if [[ -e "${active_node}" && -e "${original_node}" && "${active_node}" != "${original_node}" ]]; then
printf '\nNote: the node command changed location and the old location may be remembered in your current shell.\n'
log old "${original_node}"
log new "${active_node}"
printf 'To reset the command location hash either start a new shell, or execute PATH="$PATH"\n'
fi
fi