summaryrefslogtreecommitdiff
path: root/lib/git.zsh
diff options
context:
space:
mode:
authorMarc Cornellà <marc@mcornella.com>2024-04-05 07:38:36 +0200
committerGitHub <noreply@github.com>2024-04-05 07:38:36 +0200
commit038931039030911852d456215d6f39385d5b7a6e (patch)
tree64b703237367e814ae7173fc29b8cb63925ac95d /lib/git.zsh
parent9d529c41cc82580d0a947ce8bcf5ff7775585fe5 (diff)
downloadzsh-038931039030911852d456215d6f39385d5b7a6e.tar.gz
zsh-038931039030911852d456215d6f39385d5b7a6e.tar.bz2
zsh-038931039030911852d456215d6f39385d5b7a6e.zip
fix(lib/git): fix detection of function use in prompt
RPS1 and RPROMPT are not equivalent, though they have the same effect. Added both to detect if `git_prompt_*` is used. Fixes #12325
Diffstat (limited to 'lib/git.zsh')
-rw-r--r--lib/git.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/git.zsh b/lib/git.zsh
index 23d11db2d..c4265970b 100644
--- a/lib/git.zsh
+++ b/lib/git.zsh
@@ -57,13 +57,13 @@ if zstyle -T ':omz:alpha:lib:git' async-prompt; then
# or any of the other prompt variables
function _defer_async_git_register() {
# Check if git_prompt_info is used in a prompt variable
- case "${PS1}:${PS2}:${PS3}:${PS4}:${RPS1}:${RPS2}:${RPS3}:${RPS4}" in
+ case "${PS1}:${PS2}:${PS3}:${PS4}:${RPROMPT}:${RPS1}:${RPS2}:${RPS3}:${RPS4}" in
*(\$\(git_prompt_info\)|\`git_prompt_info\`)*)
_omz_register_handler _omz_git_prompt_info
;;
esac
- case "${PS1}:${PS2}:${PS3}:${PS4}:${RPS1}:${RPS2}:${RPS3}:${RPS4}" in
+ case "${PS1}:${PS2}:${PS3}:${PS4}:${RPROMPT}:${RPS1}:${RPS2}:${RPS3}:${RPS4}" in
*(\$\(git_prompt_status\)|\`git_prompt_status\`)*)
_omz_register_handler _omz_git_prompt_status
;;