From 27f64033827d08951b6d38d408e9a1068606cbda Mon Sep 17 00:00:00 2001 From: Arialdo Martini Date: Tue, 3 Sep 2013 07:47:52 +0200 Subject: [PATCH] fake Will merge, will rebase --- prompt.sh | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/prompt.sh b/prompt.sh index 1b6a75c..e6a1ef2 100644 --- a/prompt.sh +++ b/prompt.sh @@ -74,15 +74,29 @@ function build_prompt { if [[ ${is_a_git_repo} == true ]] then enrich ${is_a_git_repo} "❤" - enrich ${detached} "⚯" "${alert}" - enrich ${has_modifications} "✎" + enrich ${has_untracked_files} "∿" enrich ${has_adds} "+" + enrich ${has_deletions} "-" enrich ${has_deletions_cached} "✖" + + + enrich ${has_modifications} "✎" enrich ${has_modifications_cached} "→" - enrich ${has_untracked_files} "∿" + + need_to_merge=true + can_fast_forward=true + will_merge=true + will_rebase=true + + enrich ${on_a_tag} "⌫" + enrich ${detached} "⚯" "${alert}" + enrich ${need_to_merge} "ᄉ" "${alert}" + enrich ${can_fast_forward} "»" + + enrich ${has_upstream} "↕" if [[ ${detached} == true ]] then if [[ ${just_init} == true ]]; then @@ -93,7 +107,11 @@ function build_prompt { else if [[ $has_upstream == true ]] then - PS1="${PS1} ${on}(${current_branch} => ${upstream//\/$current_branch/})" + +# if [[ ${will_rebase} ]]; then type_of_upstream="↶"; fi + if [[ ${will_merge} ]]; then type_of_upstream="ᄉ"; fi + + PS1="${PS1} ${on}(${current_branch} ${type_of_upstream} ${upstream//\/$current_branch/})" else PS1="${PS1} ${on}(${current_branch})" fi