From a150e75ae8c916e3047ff9677c813ffa56cca230 Mon Sep 17 00:00:00 2001 From: aviu16 <162624394+aviu16@users.noreply.github.com> Date: Sat, 14 Feb 2026 12:30:48 -0500 Subject: [PATCH] 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 --- plugins/jj/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/jj/README.md b/plugins/jj/README.md index ad16dde89..f51852027 100644 --- a/plugins/jj/README.md +++ b/plugins/jj/README.md @@ -77,6 +77,15 @@ _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 [here](https://github.com/nasso/omzsh/blob/e439e494f22f4fd4ef1b6cb64626255f4b341c1b/themes/sunakayu.zsh-theme).