From a2e069c1a4ac81e32eefe1d9373606b54f2fc0e8 Mon Sep 17 00:00:00 2001 From: andela-abankole Date: Tue, 7 Jul 2015 07:13:09 +0100 Subject: [PATCH] update v2: a different icon displays if in a local git directory --- themes/chi.zsh-theme | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/themes/chi.zsh-theme b/themes/chi.zsh-theme index 8e1951262..7769d7d4d 100644 --- a/themes/chi.zsh-theme +++ b/themes/chi.zsh-theme @@ -42,15 +42,20 @@ function git_prompt_info() { echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIXS" } +function prompt_char { + git branch >/dev/null 2>/dev/null && echo '○' && return + echo '>' +} + # ########## PROMPT VARIABLE ########### PROMPT=' %{$fg[green]%}$(get_pwd)%{$reset_color%} 🕕 %{$fg[green]%}%*%{$reset_color%}$(put_spacing)$(git_prompt_info) -> ' +$(prompt_char) ' # ########## ZSH GIT THEME VARIABLES ########### ZSH_THEME_GIT_PROMPT_PREFIX="git:" ZSH_THEME_GIT_PROMPT_SUFFIX="$reset_color" ZSH_THEME_GIT_PROMPT_DIRTY="$fg[red]✹" -ZSH_THEME_GIT_PROMPT_CLEAN="$fg[white]" +ZSH_THEME_GIT_PROMPT_CLEAN="$fg[white]" \ No newline at end of file