File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,39 +64,39 @@ export async function waitForShellIntegration(terminal: Terminal): Promise<boole
6464}
6565
6666// Detects if the given text content appears to end with a common prompt pattern.
67- function detectsCommonPromptPattern ( cursorLine : string ) : boolean {
67+ function detectsCommonPromptPattern ( terminalData : string ) : boolean {
6868 // PowerShell prompt: PS C:\> or similar patterns
69- if ( / P S \s + [ A - Z ] : \\ .* > \s * / . test ( cursorLine ) ) {
69+ if ( / P S \s + [ A - Z ] : \\ .* > \s * / . test ( terminalData ) ) {
7070 return true ;
7171 }
7272
7373 // Command Prompt: C:\path>
74- if ( / ^ [ A - Z ] : \\ .* > \s * / . test ( cursorLine ) ) {
74+ if ( / ^ [ A - Z ] : \\ .* > \s * / . test ( terminalData ) ) {
7575 return true ;
7676 }
7777
7878 // Bash-style prompts ending with $
79- if ( / \$ \s * / . test ( cursorLine ) ) {
79+ if ( / \$ \s * / . test ( terminalData ) ) {
8080 return true ;
8181 }
8282
8383 // Root prompts ending with #
84- if ( / # \s * / . test ( cursorLine ) ) {
84+ if ( / # \s * / . test ( terminalData ) ) {
8585 return true ;
8686 }
8787
8888 // Python REPL prompt
89- if ( / ^ > > > \s * / . test ( cursorLine ) ) {
89+ if ( / ^ > > > \s * / . test ( terminalData ) ) {
9090 return true ;
9191 }
9292
9393 // Custom prompts ending with the starship character (\u276f)
94- if ( / \u276f \s * / . test ( cursorLine ) ) {
94+ if ( / \u276f \s * / . test ( terminalData ) ) {
9595 return true ;
9696 }
9797
9898 // Generic prompts ending with common prompt characters
99- if ( / [ > % ] \s * / . test ( cursorLine ) ) {
99+ if ( / [ > % ] \s * / . test ( terminalData ) ) {
100100 return true ;
101101 }
102102
You can’t perform that action at this time.
0 commit comments