Merge pull request #226929 from akinomyoga/patch-1
Fix Bash integration clobbering `$?` for PROMPT_COMMANDpull/227084/head
commit
4711122b92
|
@ -328,10 +328,10 @@ __vsc_restore_exit_code() {
|
|||
|
||||
__vsc_prompt_cmd_original() {
|
||||
__vsc_status="$?"
|
||||
builtin local cmd
|
||||
__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
|
||||
builtin local cmd
|
||||
for cmd in "${__vsc_original_prompt_command[@]}"; do
|
||||
eval "${cmd:-}"
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue