cpython/Lib/venv/scripts
Bernát Gábor 0d540afcec
gh-140006: Harden fish prompt against shadowed builtins (#150936)
A user function that shadows the `.`/`source` builtin hijacks the
activate.fish prompt. fish resolves functions ahead of builtins, so the
`echo "exit $status" | .` line that restores the exit status pipes into
the user function instead of sourcing. Dot-style directory navigators
redefine `.`, which made the prompt list the directory on every command
and dropped the exit status handed to the original prompt.

Route every builtin the prompt path uses (`source`, `echo`, `printf`,
`set_color`, `functions`) through `builtin` so no user function can
intercept them. These have all been fish builtins with a stable
interface since fish 2.0.0, the version the script already required
through `functions --copy`, so the minimum supported fish version does
not change.
2026-06-22 16:39:08 +01:00
..
common gh-140006: Harden fish prompt against shadowed builtins (#150936) 2026-06-22 16:39:08 +01:00
nt gh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat (GH-151215) 2026-06-10 09:48:16 +01:00
posix gh-124651: Quote template strings in venv activation scripts (GH-124712) 2024-10-21 21:48:04 +01:00