mirror of
https://github.com/python/cpython.git
synced 2026-06-23 03:23:38 -04:00
0d540afcec
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.