Merge pull request #208364 from nopeless/patch-1

fix: make `cmd` local in shell integration bash file
This commit is contained in:
Daniel Imms 2024-03-28 09:59:36 -07:00 committed by GitHub
commit e885e5fd9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -275,6 +275,7 @@ __vsc_prompt_cmd_original() {
__vsc_restore_exit_code "${__vsc_status}"
# Evaluate the original PROMPT_COMMAND similarly to how bash would normally
# See https://unix.stackexchange.com/a/672843 for technique
local cmd
for cmd in "${__vsc_original_prompt_command[@]}"; do
eval "${cmd:-}"
done