fix: make cmd local

This commit is contained in:
nopeless 2024-03-21 23:34:15 -05:00 committed by GitHub
parent 409da0445d
commit df6d629b30
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