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

Add a method to temporarily disable git portion of prompt #537

Open
wjl opened this issue Oct 22, 2024 · 1 comment
Open

Add a method to temporarily disable git portion of prompt #537

wjl opened this issue Oct 22, 2024 · 1 comment
Labels
🌊 enhancement New feature or request

Comments

@wjl
Copy link

wjl commented Oct 22, 2024

Is your feature request related to a problem? Please describe

I love the Tide prompt. However, when I cd into a directory with a extremely large Git repository, or even a relatively small Git repository that is being accessed over NFS or SMB, the prompt can get annoyingly slow, taking several seconds (sometimes more than 10 seconds) to display the prompt.

Describe the solution you'd like

I don't in general want to turn off the Git part of the prompt, it's very useful. But sometimes I want to turn it off just in one terminal. I would like to do this in an easy way, such as by just setting an environment variable, or alternately, by setting something in the Git configuration (perhaps similar to built-in Fish prompt which looks at bash.* variables)

Additional context

Alternately, if generating the Git portion of the prompt was 100% asynchronous, this might not be an issue. I think that parts of it might be asynchronous now, but not completely. I can work around this by removing "git" from tide_left_prompt_items and restarting the shell, but that makes global changes to the prompt and I have to manually change it and then revert it.

@wjl wjl added the 🌊 enhancement New feature or request label Oct 22, 2024
@wjl
Copy link
Author

wjl commented Oct 22, 2024

Just to note, I'd also be happy if the prompt just didn't show Git info if it timed out, I was playing with Starship to see if it had this same behavior, and it just prints a warning about git timing out, and then only shows limited Git info (it seems like just the branch, which is still useful on its own). Running Starship on the same large repository only gives a delay of ~ 0.5 s between each prompt -- still slightly slow, as it's Git on an NFS drive, but much better than I'm getting with Tide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌊 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant