Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions prompt.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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\]'}
Expand Down Expand Up @@ -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}")
Expand Down Expand Up @@ -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
Expand All @@ -173,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
Expand Down