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%# "
|
||||
prompt_precmd() {
|
||||
gitcolor=""
|
||||
if ! zgit_isindexclean ; then
|
||||
#PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f](%F{cyan}$(zgit_branch)%f)>"
|
||||
gitcolor=$fg[blue]
|
||||
elif ! zgit_isworktreeclean ; then
|
||||
#PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f]>"
|
||||
gitcolor=$fg[green]
|
||||
if zgit_isgit ; then
|
||||
if ! zgit_isindexclean ; then
|
||||
#PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f](%F{cyan}$(zgit_branch)%f)>"
|
||||
gitcolor=$fg[blue]
|
||||
elif ! zgit_isworktreeclean ; then
|
||||
#PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f]>"
|
||||
gitcolor=$fg[green]
|
||||
fi
|
||||
fi
|
||||
color="%(?.$gitcolor.$fg[red])"
|
||||
PROMPT="%m$color%#%{$reset_color%} "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue