From 8a50a98acedbffab18473f59a1132fa6174731d2 Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Mon, 14 Mar 2022 12:44:46 -0400 Subject: [PATCH] fix #145036 (#145040) --- .../browser/media/shellIntegration-bash.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh b/src/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh index 964687b7854..adfdb1e634f 100755 --- a/src/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh +++ b/src/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh @@ -85,16 +85,14 @@ prompt_cmd_original() { STATUS="$?" if [[ "$ORIGINAL_PROMPT_COMMAND" =~ .+\;.+ ]]; then IFS=';' - read -ra ADDR <<<"$ORIGINAL_PROMPT_COMMAND" - for ((i = 0; i < ${#ADDR[@]}; i++)); do - eval ${ADDR[i]} - done - IFS='' else - for i in "${ORIGINAL_PROMPT_COMMAND[@]}"; do - eval $i - done + IFS=' ' fi + read -ra ADDR <<<"$ORIGINAL_PROMPT_COMMAND" + for ((i = 0; i < ${#ADDR[@]}; i++)); do + eval ${ADDR[i]} + done + IFS='' precmd }