forked from jimlawton/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_prompt_current
More file actions
33 lines (28 loc) · 1.08 KB
/
bash_prompt_current
File metadata and controls
33 lines (28 loc) · 1.08 KB
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
#!/bin/bash
# Bash shell prompting.
# Old trusty prompt.
#export PS1='\[\033[1;34m\]\h:\W>\[\033[0m\] '
function set_virtualenv () {
if test -z "$VIRTUAL_ENV" ; then
PYTHON_VIRTUALENV=""
else
PYTHON_VIRTUALENV="${BLUE}[`basename \"$VIRTUAL_ENV\"`]${COLOR_NONE} "
fi
}
# 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\]\[$White\]:\[$IYellow\]\w" "\[$IBlue\]> \[$White\]"'
else
export PROMPT_COMMAND='log_bash_persistent_history; __git_ps1 "\[$IBlue\]\[$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'