Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: support dynamic terminal prompt detection without regex on windows #211382

Merged

Conversation

cpendery
Copy link
Member

As discussed in #210776 (comment) & similar to #209136, this PR adds support for detecting terminal prompts that fall outside the existing regexes. Prompt detection should be able to handle most new prompts once this & #211222 are closed.

Testing

Before (git-bash)

beforeDynamicPrompt.mp4

After (git-bash)

afterDynamicPrompt.mp4

Git Bash

  • Default prompt
  • Custom prompt
  • Starship prompt

Pwsh

  • Default Prompt
  • oh-my-pwsh Prompt
  • Starship prompt

@Tyriar Tyriar added this to the May 2024 milestone Apr 26, 2024
@cpendery cpendery requested a review from Tyriar April 30, 2024 20:22
@Tyriar Tyriar enabled auto-merge May 1, 2024 14:51
@Tyriar Tyriar merged commit 53c1b7b into microsoft:main May 1, 2024
6 checks passed
@Tyriar
Copy link
Member

Tyriar commented May 1, 2024

I'm seeing this on my mac:

Screenshot 2024-05-01 at 1 10 13 PM

bash version too old?

@cpendery
Copy link
Member Author

cpendery commented May 1, 2024

I'm seeing this on my mac:

Screenshot 2024-05-01 at 1 10 13 PM bash version too old?

@Tyriar the @P expand requires 4.4 or higher, I should have added a version check in the ~/.bashrc since it's not just for git-bash

@Tyriar
Copy link
Member

Tyriar commented May 1, 2024

I added a simple v4+ check to fix it quick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants