forked from jimlawton/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bash_prompt_current
35 lines (29 loc) · 1.28 KB
/
bash_prompt_current
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Bash shell prompting.
# Old trusty prompt.
#export PS1='\[\033[1;34m\]\h:\W>\[\033[0m\] '
# New shiny Git prompt.
source ~/dotfiles/git/git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE="true"
export GIT_PS1_SHOWSTASHSTATE="true"
export GIT_PS1_SHOWUNTRACKEDFILES="true"
export GIT_PS1_SHOWUPSTREAM="auto"
export GIT_PS1_SHOWCOLORHINTS="true"
if isMac; then
if [ -e "${HOME}/.iterm2_shell_integration.bash" ]; then
export PROMPT_COMMAND='title; log_bash_persistent_history; __git_ps1 "\[$IBlue\]$_SHORTUSER@$_MACHNAME\[$White\]:\[$IYellow\]\w" "\[$IBlue\]> \[$White\]"'
else
export PROMPT_COMMAND='log_bash_persistent_history; __git_ps1 "\[$IBlue\]$_SHORTUSER@$_MACHNAME\[$White\]:\[$IYellow\]\w" "\[$IBlue\]> \[$White\]"'
fi
else
export PROMPT_COMMAND='log_bash_persistent_history; __git_ps1 "\[$IBlue\]\u@\h\[$White\]:\[$IYellow\]\w" "\[$IBlue\]> \[$White\]"'
fi
export PS4='(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]}\n'
#export PROMPT_COMMAND='
#if [ -d .svn ]; then
# SVNURL=$(svn info | awk "/^URL:/ {print \$2}")
# SVNPTH=$(svn info | awk "/^URL:/ {print \$2}" | cut -d/ -f4-)
# SVNREPOS=$(svn info | awk "/^Repository Root:/ {print \$3}")
# echo -ne "\033]0;/$SVNPTH"; echo -ne "\007"
#else
# echo -ne "\033]0;${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\007"
#fi'