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
feat(async)!: implement async prompt API and apply to git prompt #12257
Conversation
BREAKING CHANGE: the `git_prompt_info` prompt function has been reworked by default to use the new async prompt feature. If you're experiencing issues see ohmyzsh#12257.
6e26976
to
7efb696
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized that if you don't have a git_prompt_info
-theme you'll still be executing the git status
thing everytime.
IMO the best way to overtake this issue is by moving the _omz_async_functions
into its own function that enables the precmd as soon as there's any function appended to it, and the git_prompt_info
could call there the first time that is executed.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last changes required
* upstream/master: (90 commits) feat(gradle): update completion to version 25da917c (ohmyzsh#12287) fix(dependencies): copy gradle LICENSE feat(dependencies): enable gradle plugin docs: fix typos (ohmyzsh#12284) docs(pyenv): fix typo (ohmyzsh#12283) feat(extract): prefer using `pbzip2` instead of `bunzip2` (ohmyzsh#12280) docs(readme): add contributor list (ohmyzsh#12236) feat(fzf): add default fzf_base for msys2 (ohmyzsh#12274) fix(async): register the git prompt async handler correctly (ohmyzsh#12267) fix(git): disable temporarely async prompt feat(async)!: implement async prompt API and apply to git prompt (ohmyzsh#12257) feat(tools): update `supports_hyperlinks` (ohmyzsh#12258) chore(gitfast): remove update script (ohmyzsh#12262) perf(nvm): don't call `nvm version` on every cd feat(nvm)!: make `lazy` and `autoload` options compatible fix(nvm): remove zsh completion fix(terraform): fix completion repeating flags with value (ohmyzsh#12256) fix(terraform): pass `-chdir` to completion commands (ohmyzsh#12254) feat(python): add auto venv activation (ohmyzsh#12248) feat(terraform): update completion to `v1.7` (ohmyzsh#12252) ...
* upstream/master: (212 commits) fix(docker-compose): completion regression (ohmyzsh#12288) feat(gradle): update completion to version 25da917c (ohmyzsh#12287) fix(dependencies): copy gradle LICENSE feat(dependencies): enable gradle plugin docs: fix typos (ohmyzsh#12284) docs(pyenv): fix typo (ohmyzsh#12283) feat(extract): prefer using `pbzip2` instead of `bunzip2` (ohmyzsh#12280) docs(readme): add contributor list (ohmyzsh#12236) feat(fzf): add default fzf_base for msys2 (ohmyzsh#12274) fix(async): register the git prompt async handler correctly (ohmyzsh#12267) fix(git): disable temporarely async prompt feat(async)!: implement async prompt API and apply to git prompt (ohmyzsh#12257) feat(tools): update `supports_hyperlinks` (ohmyzsh#12258) chore(gitfast): remove update script (ohmyzsh#12262) perf(nvm): don't call `nvm version` on every cd feat(nvm)!: make `lazy` and `autoload` options compatible fix(nvm): remove zsh completion fix(terraform): fix completion repeating flags with value (ohmyzsh#12256) fix(terraform): pass `-chdir` to completion commands (ohmyzsh#12254) feat(python): add auto venv activation (ohmyzsh#12248) ...
* master: (223 commits) fix(mise): update environment when loading the plugin (ohmyzsh#12294) fix(docker-compose): completion regression (ohmyzsh#12288) feat(gradle): update completion to version 25da917c (ohmyzsh#12287) fix(dependencies): copy gradle LICENSE feat(dependencies): enable gradle plugin docs: fix typos (ohmyzsh#12284) docs(pyenv): fix typo (ohmyzsh#12283) feat(extract): prefer using `pbzip2` instead of `bunzip2` (ohmyzsh#12280) docs(readme): add contributor list (ohmyzsh#12236) feat(fzf): add default fzf_base for msys2 (ohmyzsh#12274) fix(async): register the git prompt async handler correctly (ohmyzsh#12267) fix(git): disable temporarely async prompt feat(async)!: implement async prompt API and apply to git prompt (ohmyzsh#12257) feat(tools): update `supports_hyperlinks` (ohmyzsh#12258) chore(gitfast): remove update script (ohmyzsh#12262) perf(nvm): don't call `nvm version` on every cd feat(nvm)!: make `lazy` and `autoload` options compatible fix(nvm): remove zsh completion fix(terraform): fix completion repeating flags with value (ohmyzsh#12256) fix(terraform): pass `-chdir` to completion commands (ohmyzsh#12254) ...
…yzsh#12257) BREAKING CHANGE: the `git_prompt_info` prompt function has been reworked by default to use the new async prompt feature. If you're experiencing issues see ohmyzsh#12257. Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
…yzsh#12257) BREAKING CHANGE: the `git_prompt_info` prompt function has been reworked by default to use the new async prompt feature. If you're experiencing issues see ohmyzsh#12257. Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
…yzsh#12257) BREAKING CHANGE: the `git_prompt_info` prompt function has been reworked by default to use the new async prompt feature. If you're experiencing issues see ohmyzsh#12257. Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
…yzsh#12257) BREAKING CHANGE: the `git_prompt_info` prompt function has been reworked by default to use the new async prompt feature. If you're experiencing issues see ohmyzsh#12257. Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
Standards checklist:
Changes:
Other comments:
BREAKING CHANGE: the
git_prompt_info
prompt function has been reworked by default to use the new async prompt feature. If you're experiencing issues, you can set the following zstyle setting in your.zshrc
file before Oh My Zsh is sourced:zstyle ':omz:alpha:lib:git' async-prompt no
Fixes #10869