9a67e3b3f5e8371422a7b6cdea49931698cd8c7e

Author
御风 <1795771535y@gmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

fix(git): support nounset option (#13816)

Diff

 1diff --git a/lib/git.zsh b/lib/git.zsh
 2index 3a03dbd4d48339ab3ea0026a1361341a0bb37b09..63482df6e07c03ca19d6c6882e6bef73927cd3a6 100644
 3--- a/lib/git.zsh
 4+++ b/lib/git.zsh
 5@@ -162,13 +162,13 @@ if zstyle -t ':omz:alpha:lib:git' async-prompt \
 6   # or any of the other prompt variables
 7   function _defer_async_git_register() {
 8     # Check if git_prompt_info is used in a prompt variable
 9-    case "${PS1}:${PS2}:${PS3}:${PS4}:${RPROMPT}:${RPS1}:${RPS2}:${RPS3}:${RPS4}" in
10+    case "${PS1}:${PS2}:${PS3}:${PS4}:${RPROMPT-}:${RPS1-}:${RPS2-}:${RPS3-}:${RPS4-}" in
11     *(\$\(git_prompt_info\)|\`git_prompt_info\`)*)
12       _omz_register_handler _omz_git_prompt_info
13       ;;
14     esac
15 
16-    case "${PS1}:${PS2}:${PS3}:${PS4}:${RPROMPT}:${RPS1}:${RPS2}:${RPS3}:${RPS4}" in
17+    case "${PS1}:${PS2}:${PS3}:${PS4}:${RPROMPT-}:${RPS1-}:${RPS2-}:${RPS3-}:${RPS4-}" in
18     *(\$\(git_prompt_status\)|\`git_prompt_status\`)*)
19       _omz_register_handler _omz_git_prompt_status
20       ;;