From 4468c1b1262ff895e07f13df8eca9e8ec82f8107 Mon Sep 17 00:00:00 2001 From: MunifTanjim Date: Sat, 8 Oct 2016 12:44:34 +0600 Subject: [PATCH] improve scm_prompt_info --- themes/base.theme.bash | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/themes/base.theme.bash b/themes/base.theme.bash index f6d2be0d..16fec5a3 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -86,13 +86,13 @@ function scm_prompt_vars { } function scm_prompt_info { - scm - scm_prompt_char - SCM_DIRTY=0 - SCM_STATE='' - [[ $SCM == $SCM_GIT ]] && git_prompt_info && return - [[ $SCM == $SCM_HG ]] && hg_prompt_info && return - [[ $SCM == $SCM_SVN ]] && svn_prompt_info && return + scm_prompt_vars + if [ $SCM == $SCM_HG ]; then + echo -e "$SCM_PREFIX$SCM_BRANCH:${SCM_CHANGE#*:}$SCM_STATE$SCM_SUFFIX" + else + echo -e "$SCM_PREFIX$SCM_BRANCH$SCM_STATE$SCM_SUFFIX" + fi + return } function git_status_summary {