Trivial change: Update comments in activate about what running hash -r does (GH-125385)

Update comments about what running hash -r does

The old comment said "hash -r" forgets "past commands." However, the documentation for "hash" states that it forgets past locations. The old comment was, in my opinion, confusing. This is because it could be interpreted to mean it does something to the command history (HISTORY/HISTFILE etc) vs the cache of locations.
This commit is contained in:
Andrew Athan 2024-10-13 00:22:05 -07:00 committed by GitHub
parent a8fa4ad9e9
commit 82bcaf1589
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -14,8 +14,9 @@ deactivate () {
unset _OLD_VIRTUAL_PYTHONHOME unset _OLD_VIRTUAL_PYTHONHOME
fi fi
# Call hash to forget past commands. Without forgetting # Call hash to forget past locations. Without forgetting
# past commands the $PATH changes we made may not be respected # past locations the $PATH changes we made may not be respected.
# See "man bash" for more details. hash is usually a builtin of your shell
hash -r 2> /dev/null hash -r 2> /dev/null
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then