From 39b216e0174edec3b9aecd895c34b47c886f89d5 Mon Sep 17 00:00:00 2001 From: philip82148 <92205270+philip82148@users.noreply.github.com> Date: Tue, 31 Oct 2023 10:22:49 +0900 Subject: [PATCH] fix __CURRENT_GIT_STATUS warning --- simplerich.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simplerich.zsh-theme b/simplerich.zsh-theme index 6c8dee7..3d85067 100644 --- a/simplerich.zsh-theme +++ b/simplerich.zsh-theme @@ -156,7 +156,7 @@ ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[yellow]%}%{…%G%}" ZSH_THEME_GIT_PROMPT_CLEAN="" git_super_status() { - precmd_update_git_vars + precmd_update_git_vars >/dev/null 2>&1 if [ -z "$__CURRENT_GIT_STATUS" ]; then return @@ -210,7 +210,7 @@ _simplerich_prompt() { if [ -v CONDA_DEFAULT_ENV ]; then echo "%{$fg[magenta]%}(${CONDA_DEFAULT_ENV})%{$reset_color%}" elif [ -v VIRTUAL_ENV ]; then - parent=$(dirname ${VIRTUAL_ENV}) + local parent=$(dirname ${VIRTUAL_ENV}) if [[ "${PWD/#$parent/}" != "$PWD" ]]; then # PWD is under the parent echo "%{$fg[magenta]%}($(basename ${VIRTUAL_ENV}))%{$reset_color%}"