mirror of
https://github.com/ChesterYue/ohmyzsh-theme-passion.git
synced 2026-07-25 14:01:03 +00:00
fix __CURRENT_GIT_STATUS warning
This commit is contained in:
parent
d5694fe648
commit
39b216e017
1 changed files with 2 additions and 2 deletions
|
|
@ -156,7 +156,7 @@ ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[yellow]%}%{…%G%}"
|
||||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
|
||||||
git_super_status() {
|
git_super_status() {
|
||||||
precmd_update_git_vars
|
precmd_update_git_vars >/dev/null 2>&1
|
||||||
|
|
||||||
if [ -z "$__CURRENT_GIT_STATUS" ]; then
|
if [ -z "$__CURRENT_GIT_STATUS" ]; then
|
||||||
return
|
return
|
||||||
|
|
@ -210,7 +210,7 @@ _simplerich_prompt() {
|
||||||
if [ -v CONDA_DEFAULT_ENV ]; then
|
if [ -v CONDA_DEFAULT_ENV ]; then
|
||||||
echo "%{$fg[magenta]%}(${CONDA_DEFAULT_ENV})%{$reset_color%}"
|
echo "%{$fg[magenta]%}(${CONDA_DEFAULT_ENV})%{$reset_color%}"
|
||||||
elif [ -v VIRTUAL_ENV ]; then
|
elif [ -v VIRTUAL_ENV ]; then
|
||||||
parent=$(dirname ${VIRTUAL_ENV})
|
local parent=$(dirname ${VIRTUAL_ENV})
|
||||||
if [[ "${PWD/#$parent/}" != "$PWD" ]]; then
|
if [[ "${PWD/#$parent/}" != "$PWD" ]]; then
|
||||||
# PWD is under the parent
|
# PWD is under the parent
|
||||||
echo "%{$fg[magenta]%}($(basename ${VIRTUAL_ENV}))%{$reset_color%}"
|
echo "%{$fg[magenta]%}($(basename ${VIRTUAL_ENV}))%{$reset_color%}"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue