diff --git a/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.ts b/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.ts index fe081481c8be0d..2a2b51307d4661 100644 --- a/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.ts +++ b/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.ts @@ -950,7 +950,7 @@ class WindowsPtyHeuristics extends Disposable { } // Bash Prompt - const bashPrompt = lineText.match(/^(?.*\$)/)?.groups?.prompt; + const bashPrompt = lineText.match(/^(?\$)/)?.groups?.prompt; if (bashPrompt) { const adjustedPrompt = this._adjustPrompt(bashPrompt, lineText, '$'); if (adjustedPrompt) {