-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_settings
39 lines (34 loc) · 889 Bytes
/
.bash_settings
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
# prompt
use_color=false
safe_term=${TERM//[^[:alnum:]]/?}
if [[ -f /etc/DIR_COLORS ]] ; then
match_lhs=$(</etc/DIR_COLORS)
elif type -p dircolors >/dev/null ; then
match_lhs=$(dircolors --print-database)
else
match_lhs=""
fi
[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
if ${use_color} ; then
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] \$ '
else
export PS1='\u@\h:\w \$ '
fi
# history settings
HISTIGNORE='&:ls:v:[bf]g:cd:cd *:exit'
HISTCONTROL=ignoreboth
HISTSIZE=65536
shopt -s histappend
shopt -s histreedit
shopt -s histverify
# bash completion
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
# misc settings
set -o vi
shopt -s checkwinsize