-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
60 lines (46 loc) · 1.14 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
#!/bin/bash
COLOR_CONF="${HOME}/.colors"
if [ -f ${COLOR_CONF} ]; then
. ${COLOR_CONF}
fi
# set the default prompt color
COLOR_PROMPT=$COLOR_DEFAULT
# load host specifics
HOST_CONF="${HOME}/.$(hostname -s)"
if [ -f ${HOST_CONF} ]; then
. ${HOST_CONF}
fi
# load completion
if [ -f /usr/local/etc/bash_completion ] && ! shopt -oq posix; then
. /usr/local/etc/bash_completion
fi
# load os specifics
OS_ID=`uname | tr A-Z a-z` # translate uppercase to lowercase
OS_CONF="${HOME}/.${OS_ID}"
if [ -f ${OS_CONF} ]; then
. ${OS_CONF}
fi
if [ -f ~/.environment ]; then
. ~/.environment
fi
if [ -f ~/.bash_prompt ]; then
. ~/.bash_prompt
fi
if [ -f ~/.bash_alias ]; then
. ~/.bash_alias
fi
# Specific env per host, not to be checked in
if [ -f ~/.bash_local_env ]; then
. ~/.bash_local_env
fi
# bash specifics
# don't put duplicate lines in the history
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# size of history
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize