You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the untracked_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:
If the execution time of a segment exceeds a configurable threshold (e.g., X milliseconds):
Display the prompt immediately with cached output for the slow segment.
Continue executing the segment in the background and update the cache when the result is ready.
Use the updated result from the background process in the next prompt rendering.
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:
@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.
Can you please clarify what you mean and how it relates to this feature?
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.
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.
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: