]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Trivial change: Update comments in activate about what running hash -r does (GH-125385)
authorAndrew Athan <24279435+aathan@users.noreply.github.com>
Sun, 13 Oct 2024 07:22:05 +0000 (00:22 -0700)
committerGitHub <noreply@github.com>
Sun, 13 Oct 2024 07:22:05 +0000 (08:22 +0100)
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.

Lib/venv/scripts/common/activate

index cbd4873f01224646b220d24ad8f341e1044f1a62..4593799b7e9b0ea7185024de93146161d0ca3c9a 100644 (file)
@@ -14,8 +14,9 @@ deactivate () {
         unset _OLD_VIRTUAL_PYTHONHOME
     fi
 
-    # Call hash to forget past commands. Without forgetting
-    # past commands the $PATH changes we made may not be respected
+    # Call hash to forget past locations. Without forgetting
+    # 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
 
     if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then