This commit is contained in:
2022-01-11 17:41:12 +01:00
parent d50b5d058e
commit a680dc8c1e
2 changed files with 25 additions and 6 deletions

View File

@@ -1,8 +1,27 @@
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%} [%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_ADDED="A"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg_bold[blue]%}]%{$reset_color%} " ZSH_THEME_GIT_PROMPT_MODIFIED="M"
ZSH_THEME_GIT_PROMPT_DELETED="M"
ZSH_THEME_GIT_PROMPT_RENAMED="M"
ZSH_THEME_GIT_PROMPT_UNMERGED=""
ZSH_THEME_GIT_PROMPT_UNTRACKED="U"
function my_git_color() {
local state="$(git_prompt_status)"
ZSH_THEME_GIT_PROMPT_PREFIX="%F{blue} [%f"
case "$state" in
*"A"*) ZSH_THEME_GIT_PROMPT_PREFIX+="%B%F{green}";;
*"M"*) ZSH_THEME_GIT_PROMPT_PREFIX+="%B%F{yellow}";;
*"U"*) ZSH_THEME_GIT_PROMPT_PREFIX+="%F{141}";;
*) ZSH_THEME_GIT_PROMPT_PREFIX+="%F{red}";;
esac
}
ZSH_THEME_GIT_PROMPT_PREFIX="%F{blue} [%F{red}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%b%F{blue}]%f "
ZSH_THEME_GIT_PROMPT_DIRTY="" ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN="" ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_VIRTUALENV_PREFIX="%F{white}[%B%F{green}"
ZSH_THEME_VIRTUALENV_SUFFIX="%b%F{white}]%f "
PROMPT_CHAR="%{$fg_bold[gray]%}\$" PROMPT_CHAR="%B%F{grey}\$%b%f"
PROMPT="%(?:%{$fg_bold[green]%}➜:%{$fg_bold[red]%}➜)" PROMPT='%B%(?:%F{green}➜:%F{red}➜)%b %F{cyan}%c%f $(virtualenv_prompt_info)$(my_git_color)$(git_prompt_info)$PROMPT_CHAR%f '
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)$PROMPT_CHAR%{$reset_color%} '

View File

@@ -70,7 +70,7 @@ ZSH_THEME="custom-robbyrussell"
# Custom plugins may be added to $ZSH_CUSTOM/plugins/ # Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse) # Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup. # Add wisely, as too many plugins slow down shell startup.
plugins=(colored-man-pages docker docker-compose git npm ubuntu) plugins=(colored-man-pages docker docker-compose git npm ubuntu virtualenv)
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh