From 5d97a9b1e90d9ed406b43a32265536c238261ba9 Mon Sep 17 00:00:00 2001 From: kisPocok Date: Mon, 4 May 2015 16:25:43 +0200 Subject: [PATCH 1/2] Updatable End Of Line symbol --- prompt.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 prompt.sh diff --git a/prompt.sh b/prompt.sh old mode 100644 new mode 100755 index 3052f94..30570d4 --- a/prompt.sh +++ b/prompt.sh @@ -25,6 +25,7 @@ if [ -n "${BASH_VERSION}" ]; then : ${omg_merge_tracking_branch_symbol:=''} #  : ${omg_should_push_symbol:=''} #   : ${omg_has_stashes_symbol:=''} + : ${omg_eol_symbol:=''} : ${omg_default_color_on:='\[\033[1;37m\]'} : ${omg_default_color_off:='\[\033[0m\]'} @@ -127,7 +128,7 @@ if [ -n "${BASH_VERSION}" ]; then # where - prompt="${prompt} ${white_on_red} ${black_on_red}" + prompt="${prompt} ${white_on_red}${omg_eol_symbol} ${black_on_red}" if [[ $detached == true ]]; then prompt+=$(enrich_append $detached $omg_detached_symbol "${white_on_red}") prompt+=$(enrich_append $detached "(${current_commit_hash:0:7})" "${black_on_red}") @@ -159,7 +160,7 @@ if [ -n "${BASH_VERSION}" ]; then fi fi prompt+=$(enrich_append ${is_on_a_tag} "${omg_is_on_a_tag_symbol} ${tag_at_current_commit}" "${black_on_red}") - prompt+="${omg_last_symbol_color}${reset}\n" + prompt+="${omg_last_symbol_color}${omg_eol_symbol}${reset}\n" prompt+="$(eval_prompt_callback_if_present)" prompt+="${omg_second_line}" else From 087cba74baadd6b5677a273bb2837872e3bc08a2 Mon Sep 17 00:00:00 2001 From: kisPocok Date: Mon, 4 May 2015 17:18:43 +0200 Subject: [PATCH 2/2] Use 1 line only --- prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prompt.sh b/prompt.sh index 30570d4..f47aaf4 100755 --- a/prompt.sh +++ b/prompt.sh @@ -174,7 +174,7 @@ if [ -n "${BASH_VERSION}" ]; then PS2="${yellow}→${reset} " function bash_prompt() { - PS1="$(build_prompt)" + PS1="$PS1$(build_prompt)" } PROMPT_COMMAND=bash_prompt