From dfd1eb793369a79c4b1618f37c65b80c1412293b Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Mon, 21 Nov 2022 01:42:31 -0800 Subject: [PATCH] Clean up git prompt exclude hook --- init.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.zsh b/init.zsh index e500d96..7ddb01a 100644 --- a/init.zsh +++ b/init.zsh @@ -158,15 +158,15 @@ function __zsh_vim_key_prompt_handler { printf '\e[%d q' "${_shape}" } function __zsh_check_disabled_git_prompt_dirs { - local excluded=false + local reset_prompt=true for file in ${(s:\0:)__ZSH_PROMPT_EXCLUDE_GIT_STATUS}; do if [[ "${PWD:P}/" = "${file}/"* ]]; then SPACESHIP_GIT_STATUS_SHOW=false - excluded=true + reset_prompt=false break fi done - if ! $excluded; then + if "${reset_prompt}"; then SPACESHIP_GIT_STATUS_SHOW=true fi }