mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-27 03:14:56 +01:00
docs(jj): clarify git async-prompt limitation with wrapper functions
When wrapping git_prompt_info in a custom function (as recommended for jj fallback), the git async prompt feature fails to detect the usage pattern and doesn't register async handlers. This causes git_prompt_info to return nothing. Add a note explaining this limitation and providing two workarounds: - Disable git async prompt entirely - Force async handlers to register unconditionally Fixes #13555
This commit is contained in:
parent
88659ed193
commit
a150e75ae8
1 changed files with 9 additions and 0 deletions
|
|
@ -77,6 +77,15 @@ _my_theme_vcs_info() {
|
||||||
PROMPT='$(_my_theme_vcs_info) $'
|
PROMPT='$(_my_theme_vcs_info) $'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **Note:** When using a wrapper function around `git_prompt_info`, the git async prompt feature
|
||||||
|
> (enabled by default on Zsh ≥5.0.6) will not work because it only detects the literal pattern
|
||||||
|
> `$(git_prompt_info)` in prompt variables. To fix this, either:
|
||||||
|
>
|
||||||
|
> - Disable git async prompt: `zstyle ':omz:alpha:lib:git' async-prompt no`
|
||||||
|
> - Force async handlers to always register: `zstyle ':omz:alpha:lib:git' async-prompt force`
|
||||||
|
>
|
||||||
|
> See [issue #13555](https://github.com/ohmyzsh/ohmyzsh/issues/13555) for details.
|
||||||
|
|
||||||
You can find an example
|
You can find an example
|
||||||
[here](https://github.com/nasso/omzsh/blob/e439e494f22f4fd4ef1b6cb64626255f4b341c1b/themes/sunakayu.zsh-theme).
|
[here](https://github.com/nasso/omzsh/blob/e439e494f22f4fd4ef1b6cb64626255f4b341c1b/themes/sunakayu.zsh-theme).
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue