fixing git colors outside of git
This commit is contained in:
parent
bb5204b76d
commit
179df718ca
1 changed files with 8 additions and 6 deletions
14
.zshrc
14
.zshrc
|
|
@ -81,12 +81,14 @@ export GPGKEY="48C7AF0C"
|
||||||
#PS1="%m%# "
|
#PS1="%m%# "
|
||||||
prompt_precmd() {
|
prompt_precmd() {
|
||||||
gitcolor=""
|
gitcolor=""
|
||||||
if ! zgit_isindexclean ; then
|
if zgit_isgit ; then
|
||||||
#PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f](%F{cyan}$(zgit_branch)%f)>"
|
if ! zgit_isindexclean ; then
|
||||||
gitcolor=$fg[blue]
|
#PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f](%F{cyan}$(zgit_branch)%f)>"
|
||||||
elif ! zgit_isworktreeclean ; then
|
gitcolor=$fg[blue]
|
||||||
#PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f]>"
|
elif ! zgit_isworktreeclean ; then
|
||||||
gitcolor=$fg[green]
|
#PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f]>"
|
||||||
|
gitcolor=$fg[green]
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
color="%(?.$gitcolor.$fg[red])"
|
color="%(?.$gitcolor.$fg[red])"
|
||||||
PROMPT="%m$color%#%{$reset_color%} "
|
PROMPT="%m$color%#%{$reset_color%} "
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue