From 9a67e3b3f5e8371422a7b6cdea49931698cd8c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=A1=E9=A3=8E?= <1795771535y@gmail.com> Date: Mon, 15 Jun 2026 18:08:05 +0800 Subject: [PATCH] fix(git): support nounset option (#13816) --- lib/git.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/git.zsh b/lib/git.zsh index 3a03dbd4d..63482df6e 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -162,13 +162,13 @@ if zstyle -t ':omz:alpha:lib:git' async-prompt \ # 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}:${RPROMPT}:${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}:${RPROMPT}:${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 ;;