-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Lazy loading segments or async execution #6094
Comments
@maratori this is a very challenging feature as oh-my-posh isn't shell native. It can be achieved, but nowhere near easily. And unfortunately that's one of these features where I simply don't have the time until this project's funding allows me to partially quit my day job. |
Yes, I agree.
Can you please clarify what you mean and how it relates to this feature?
I completely understand your time constraints. Perhaps I could work on implementing this feature. However, we would need to design it first, as there are several key design decisions to address before creating a PR. |
@maratori as oh-my-posh' main code is written in I'll see if I can add the segment timeout function already, as that's a prerequisite to this. It might also help me understand how this could work. |
I think there is another option. The main process can run This can be combined with file locks to avoid creating extra processes. Of course, this is necessary only if sync execution takes too much time. |
Code of Conduct
What would you like to see added?
I work with a large monorepo where running
git status
takes around 4 seconds to complete. Currently, Oh-My-Posh is not designed for handling such scenarios. To work around this, I’ve used theuntracked_modes
property (alternatively,ignore_status
property can be used):While this approach improves performance, it comes at the cost of losing some key pieces of information in the prompt.
Meanwhile, Oh My Zsh handles such cases seamlessly by leveraging an async prompt.
I propose adding similar asynchronous support to Oh-My-Posh. The key idea is as follows:
This enhancement, especially when combined with periodic refreshing (#5036), would significantly improve the user experience.
Additionally, it could serve as an alternative to p10k-like instant prompts (#5310).
The text was updated successfully, but these errors were encountered: