Skip to content

Commit 72216f2

Browse files
authored
Merge pull request microsoft#213908 from microsoft/tyriar/212180
Check minor bash version before using @p
2 parents 4dde670 + c31c6c6 commit 72216f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ builtin printf "\e]633;P;ContinuationPrompt=$(echo "$PS2" | sed 's/\x1b/\\\\x1b/
168168
__vsc_report_prompt() {
169169
# Expand the original PS1 similarly to how bash would normally
170170
# See https://stackoverflow.com/a/37137981 for technique
171-
if ((BASH_VERSINFO[0] >= 4)); then
171+
if ((BASH_VERSINFO[0] >= 5 || (BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] >= 4))); then
172172
__vsc_prompt=${__vsc_original_PS1@P}
173173
else
174174
__vsc_prompt=${__vsc_original_PS1}

0 commit comments

Comments
 (0)