Skip to content

Commit 4f8632d

Browse files
docs(jj): compatibility with git async prompt (ohmyzsh#13602)
Co-authored-by: Nicknames96 <nicknames96@users.noreply.github.com>
1 parent bf29483 commit 4f8632d

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

plugins/jj/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,25 @@ If you prefer to keep your prompt always up-to-date but still don't want to _fee
9898
your prompt asynchronous. This plugin doesn't do this automatically so you'd have to hack your theme a bit for
9999
that.
100100

101+
### Git async-prompt compatibility
102+
103+
If you use a wrapper function that calls `git_prompt_info` (as shown above), it won't work with
104+
the default git async-prompt mode. This is because async-prompt only registers its background worker
105+
when it detects `$(git_prompt_info)` literally in your prompt variables. A wrapper like
106+
`$(_my_theme_vcs_info)` won't match, so the async output stays empty.
107+
108+
To fix this, add one of the following to your `.zshrc` **before** Oh My Zsh is sourced:
109+
110+
```zsh
111+
# Option 1: force async handlers to always register (recommended, keeps async behavior)
112+
zstyle ':omz:alpha:lib:git' async-prompt force
113+
114+
# Option 2: disable async-prompt entirely (simpler, but prompt may feel slower in large repos)
115+
zstyle ':omz:alpha:lib:git' async-prompt no
116+
```
117+
118+
See [#13555](https://github.com/ohmyzsh/ohmyzsh/issues/13555) for details.
119+
101120
## See Also
102121

103122
- [martinvonz/jj](https://github.com/martinvonz/jj)

0 commit comments

Comments
 (0)