-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
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
GIT INFORMATION NOT APPEARING IN PROMPT #12267
Comments
I had the same problem, I switched to the previous version first.
|
See workaround in #12257 |
tl;dr: Add this to your zstyle ':omz:alpha:lib:git' async-prompt no |
The new feature has been disabled temporarely. Running |
This fix conditionally registers the git prompt async handler only if `git_prompt_info` is used anywhere in the prompt variables. This is done in the proper order, so that the async request is processed once the handler has been registered. This fix also passes the return value of the previous command to each of the async handlers, in case they are needed.
We found the culprit and I committed the fix in 06753e8. For now, the async prompt for git is turned off by default. You can however test it out with zstyle ':omz:alpha:lib:git' async-prompt yes We're quite proud of this one, and although it needs some work, we think it will get rid of all the "slow git prompt" issues, as it will now be rendered asynchronously. Here's a recording of a before/after enabling on a shallow copy of the git repo https://github.com/torvalds/linux (which is a good test for slowness). Please test and send in your feedback! Thanks!! |
@mcornella that seems to be working fine on the first few runs. I must say that already on my small git repos I can feel the difference. Amazing work! |
* 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) ...
…12267) This fix conditionally registers the git prompt async handler only if `git_prompt_info` is used anywhere in the prompt variables. This is done in the proper order, so that the async request is processed once the handler has been registered. This fix also passes the return value of the previous command to each of the async handlers, in case they are needed.
…12267) This fix conditionally registers the git prompt async handler only if `git_prompt_info` is used anywhere in the prompt variables. This is done in the proper order, so that the async request is processed once the handler has been registered. This fix also passes the return value of the previous command to each of the async handlers, in case they are needed.
This is now enabled by default since ec1afe9 after fixing some logic and performance issues. Disabling it is done the same way, but you should not experience any issues and instead get the full awesomeness of async prompt. Please comment here or reopen if you have any issues! |
I still face problems. How would I be able to debug this one? |
What problems? Ideally a screenshot or terminal output would be helpful. |
Same problems as OP: Before: After: theme: https://github.com/sobolevn/sobole-zsh-theme |
I see, your theme uses a custom function print git information. We didn't take into account this situation. It's reproducible as well with |
Same bug happening with theme pygmalion. OS / Linux distribution: macOS Sonoma 14.4.1 |
@coradinibr I had the same issue, to fix it you have to switch the git info command in
|
I was using a custom theme (bullet-train) and I needed to replace |
Don't do this:
Instead, add zstyle ':omz:alpha:lib:git' async-prompt no to your Please track #12328 for updates. |
Describe the bug
I've just ran
omz update
and now it does not seem to work correctly; but neither do I know how I would debug thisSteps to reproduce
Update from the version that I had to the current and suddenly my git configuration is gone.
Expected behavior
It'd keep my git configuration as outlined in the first screenshot.
Screenshots and recordings
Before it used to display everything correctly:
But now it is missing all the informations:
OS / Linux distribution
macOS Sonoma 14.3.1
Zsh version
5.9
Terminal emulator
iTerm2
If using WSL on Windows, which version of WSL
None
Additional context
No response
The text was updated successfully, but these errors were encountered: