-
Notifications
You must be signed in to change notification settings - Fork 1
/
bashrc
executable file
·75 lines (61 loc) · 1.7 KB
/
bashrc
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
if [ ! PS1 ]; then
# Shell is non-interactive. Be done now
return
fi
# Shell is interactive. It is okay to produce output at this point,
# though this example doesn't produce any. Do setup for
# command-line interactivity.
if [ -e /etc/bashrc ]; then
. /etc/bashrc
fi
# Load environment settings from profile.env
if [ -e ~/.profile.env ]; then
. ~/.profile.env
fi
# Load settings that are unique to this host
if [ -e ~/.profile.host ]; then
. ~/.profile.host
fi
if [ -e ~/.alias ]; then
. ~/.alias
fi
# Aliases that are not to be shared between different hosts/environments
if [ -e ~/.alias.host ]; then
. ~/.alias.host
fi
# bash history configuration
shopt -s histappend
shopt -s cdspell
export HISTCONTROL=erasedups
export HISTSIZE=100000
export PROMPT_COMMAND='history -a'
# Color Variables for Prompt
export BLACK='\[\e[00;30m\]'
export GRAY='\[\e[01;30m\]'
export RED='\[\e[00;31m\]'
export PINK='\[\e[01;31m\]'
export GREEN='\[\e[00;32m\]'
export L_GREEN='\[\e[01;32m\]'
export YELLOW='\[\e[00;33m\]'
export L_YELLOW='\[\e[01;33m\]'
export BLUE='\[\e[00;34m\]'
export L_BLUE='\[\e[01;34m\]'
export PURPLE='\[\e[00;35m\]'
export L_PURPLE='\[\e[01;35m\]'
export CYAN='\[\e[00;36m\]'
export L_CYAN='\[\e[01;36m\]'
export L_GRAY='\[\e[00;37m\]'
export WHITE='\[\e[01;37m\]'
export NONE='\[\e[00m\]'
export NORM='\[\e[01;00;0m\]'
# ME is defined in .profile.host
if [[ "$USER" == "$ME" ]]; then
export MYCOLOR=$L_YELLOW
else
export MYCOLOR=$L_PURPLE
fi
PROMPT="${RED}\u${GRAY}@${L_BLUE}\H${GRAY}:${MYCOLOR}\w${NONE} \`git branch --show-current\`\n${L_GREEN}\$${NONE} "
TITLEBAR="\[\e]2;\W\a\]"
PS1=$TITLEBAR$PROMPT
stty erase
source ~/.bash_completion.d/git-completion.bash