/
.bash-variables
50 lines (39 loc) · 1006 Bytes
/
.bash-variables
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
# manipulating paths
pushpath() {
path=$1
fgrep -q $2 <<< ${!path} || eval $path+=:$2
}
# adjust my search path
for dir in /usr/local/sbin $HOME/bin; do
[ -d $dir ] && pushpath PATH $dir
done
pushpath PATH ::
# use my preferred editor
export EDITOR=/usr/bin/vim
[[ -f $EDITOR ]] || EDITOR=/usr/bin/vi
VISUAL=$EDITOR
FC_EDITOR=$EDITOR
GIT_EDITOR=$EDITOR
set -o vi
# add my own locate database
[[ -f ~/var/mlocate.db ]] && export LOCATE_PATH=~/var/mlocate.db
# don't ^D to logout
set -o ignoreeof
# customize behavior of cd
for i in ~ ~/Projects ~/Digs ~/Desktop ~/Desktop/Python; do
pushpath CDPATH $i
done
set -P
# do other shell trickery
shopt -s cdspell checkwinsize # dirspell globstar
# keep lots of history
export HISTFILESIZE=100000000
export HISTSIZE=100000
export HISTCONTROL=ignoreboth
shopt -s histappend
# make ansible funny
export ANSIBLE_COW_SELECTION=random
# less shouldn't page if < 1 page.
export LESS="-eRFX $LESS"
export LC_ALL='en_US.UTF-8'
export LANG='en_US.UTF-8'