2014-05-28 03:05:03 -04:00
|
|
|
PSORG=$PS1;
|
2013-11-13 03:57:29 -05:00
|
|
|
if [ -n "${BASH_VERSION}" ]; then
|
2013-11-16 02:33:48 -05:00
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
|
2013-11-13 03:57:29 -05:00
|
|
|
# Symbols
|
|
|
|
: ${is_a_git_repo_symbol:='❤'}
|
|
|
|
: ${has_untracked_files_symbol:='∿'}
|
|
|
|
: ${has_adds_symbol:='+'}
|
|
|
|
: ${has_deletions_symbol:='-'}
|
|
|
|
: ${has_deletions_cached_symbol:='✖'}
|
|
|
|
: ${has_modifications_symbol:='✎'}
|
|
|
|
: ${has_modifications_cached_symbol:='☲'}
|
|
|
|
: ${ready_to_commit_symbol:='→'}
|
|
|
|
: ${is_on_a_tag_symbol:='⌫'}
|
|
|
|
: ${needs_to_merge_symbol:='ᄉ'}
|
|
|
|
: ${has_upstream_symbol:='⇅'}
|
|
|
|
: ${detached_symbol:='⚯ '}
|
|
|
|
: ${can_fast_forward_symbol:='»'}
|
|
|
|
: ${has_diverged_symbol:='Ⴤ'}
|
|
|
|
: ${rebase_tracking_branch_symbol:='↶'}
|
|
|
|
: ${merge_tracking_branch_symbol:='ᄉ'}
|
|
|
|
: ${should_push_symbol:='↑'}
|
|
|
|
: ${has_stashes_symbol:='★'}
|
|
|
|
|
|
|
|
# Flags
|
|
|
|
: ${display_has_upstream:=false}
|
|
|
|
: ${display_tag:=false}
|
|
|
|
: ${display_tag_name:=true}
|
|
|
|
: ${two_lines:=true}
|
|
|
|
: ${finally:='\w ∙ '}
|
|
|
|
: ${use_color_off:=false}
|
|
|
|
|
|
|
|
# Colors
|
2014-01-23 04:16:57 -05:00
|
|
|
: ${on='\[\033[1;37m\]'}
|
|
|
|
: ${off='\[\033[0m\]'}
|
|
|
|
: ${red='\[\033[0;31m\]'}
|
|
|
|
: ${green='\[\033[0;32m\]'}
|
|
|
|
: ${yellow='\[\033[1;33m\]'}
|
|
|
|
: ${violet='\[\033[0;35m\]'}
|
|
|
|
: ${branch_color='\[\033[1;34m\]'}
|
|
|
|
: ${reset='\[\033[0m\]'}
|
|
|
|
|
2013-11-13 03:57:29 -05:00
|
|
|
PS2="${yellow}→${reset} "
|
2014-01-23 04:16:57 -05:00
|
|
|
|
2013-11-15 15:22:03 -05:00
|
|
|
source ${DIR}/base.sh
|
2013-11-13 03:57:29 -05:00
|
|
|
function bash_prompt() {
|
2013-11-13 07:43:50 -05:00
|
|
|
PS1="$(build_prompt)"
|
2013-11-13 03:57:29 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
PROMPT_COMMAND=bash_prompt
|
|
|
|
fi
|