-
Notifications
You must be signed in to change notification settings - Fork 2
/
.bashrc
42 lines (32 loc) · 863 Bytes
/
.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
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
shopt -s histappend
HISTSIZE=1000
HISTFILESIZE=2000
shopt -s checkwinsize
case "$TERM" in
xterm-color) color_prompt=yes;;
screen) PROMPT_COMMAND='echo -n -e "\033k$USER\033\134"';;
esac
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$UID" = "0" ]; then
PS1='\[\033[G\]\[\e[1;31m\][\u@\h]\W \$\[\e[0m\] '
else
PS1='\[\033[G\]\[\e[1;32m\][\u@\h]\W \$\[\e[0m\] '
fi
if [ -f ~/.shell_aliases ]; then
. ~/.shell_aliases
fi
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi