-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_bash_profile
More file actions
45 lines (35 loc) · 1.05 KB
/
dot_bash_profile
File metadata and controls
45 lines (35 loc) · 1.05 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
34
35
36
37
38
39
40
41
42
43
44
45
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
HISTSIZE=100000 # Mega command history...
HISTFILESIZE="${HISTSIZE}" # do need to set this?
shopt -s histappend
__reboot_required_ps1 () {
[[ -e /var/run/reboot-required ]] && {
echo "REBOOT:"
}
}
# fallback in case git completion doesn't get loaded
__git_ps1 () {
:
}
# avoid command not found package suggestions
unset command_not_found_handle
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
if hash brew 2> /dev/null; then
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
fi
# Git autocomplete for `g` also
complete -o default -o nospace -F _git g
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWCOLORHINTS=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWUPSTREAM="auto"
export PROMPT_DIRTRIM="3" # Trim dirs printed by PS1's "\w"
#export PS1="\h:\W \u\$(__git_ps1)$ "
export PS1="\$(__reboot_required_ps1)\w\$(__git_ps1)$ "
if [ ! -z "${SSH_CLIENT}" ]; then
export PS1="\h:${PS1}"
fi