From 296bfcfa1571a42c899193045f3cf5100191345f Mon Sep 17 00:00:00 2001 From: bretello Date: Fri, 4 Dec 2020 02:52:15 +0100 Subject: [PATCH] zsh-theme: tweak git prompt use with DISABLE_UNTRACKED_DIRTY=true --- brethil.zsh-theme | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/brethil.zsh-theme b/brethil.zsh-theme index 897360a..130a12b 100644 --- a/brethil.zsh-theme +++ b/brethil.zsh-theme @@ -19,8 +19,8 @@ local PATH_PROMPT="%F{white}[%F{green}%(4~:…/%3~:%~)%F{white}]%f" # Shows las ZSH_THEME_GIT_PROMPT_PREFIX="%f%{$fg[yellow]%} " ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[white]%} %{$fg[red]%}✗%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[white]%} %{$fg[green]%}√%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[white]%}%{$fg[red]%}x%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[white]%}%{$fg[green]%}√%{$reset_color%}" # The following are part of `git_prompt_status` # Rules: @@ -28,14 +28,13 @@ ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[white]%} %{$fg[green]%}√%{$reset_color%}" # * : modified # + : added # $ : stashed -ZSH_THEME_GIT_PROMPT_UNTRACKED="%B%F{red}?%b%f" # red -# ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[red]%}±" # this is equivalent to DIRTY, if DISABLE_UNTRACKED_FILES_DIRTY is set -ZSH_THEME_GIT_PROMPT_ADDED="%B%F{34}+%b%f" # green ZSH_THEME_GIT_PROMPT_STASHED="%B%F{32}$%b%f" # blue +# ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[red]%}✗ " # this is equivalent to DIRTY, if DISABLE_UNTRACKED_FILES_DIRTY is set +ZSH_THEME_GIT_PROMPT_ADDED="%B%F{34}+%b%f" # green +ZSH_THEME_GIT_PROMPT_UNTRACKED="%B%F{red}?%b%f" # red # The following are part of `git_remote_status` # ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE="%{$fg[green]%}=" -ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE="" ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE="%F{255}>%f" ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="%F{255}<%f" ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="%F{255}<>%f" @@ -58,7 +57,7 @@ function virtualenv_info { function git_prompt() { if [[ -n "$(git status 2>/dev/null)" ]]; then - local GIT_PROMPT="%F{255}($(git_prompt_info)$(git_prompt_status)$(git_remote_status)%F{255})%f" + local GIT_PROMPT="%F{255}($(git_prompt_info)%B%F{255}|%f%b$(git_prompt_status)$(git_remote_status)%F{255})%f" echo "$GIT_PROMPT" else echo ""