-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
52 lines (40 loc) · 1.3 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
source ~/.profile
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
# source completions always, overwriting existing ones
for FILE in rake; do
source ~/.bash/$FILE-completion.bash
done
# source completions if not already defined
for FILE in {git,capistrano,thor,git-flow,todo}; do
complete -p $FILE 1>/dev/null 2>&1 || source ~/.bash/$FILE-completion.bash
done
source ~/.bash/aliases
for FILE in `ls ~/.bash/functions/*`; do
source $FILE
done
# update lines and columns upon window resize
shopt -s checkwinsize
# Tweak History handling
export HISTCONTROL="erasedups:ignoreboth"
export HISTSIZE=40000000
export HISTFILESIZE=40000000
shopt -s histappend
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# manage prompt and terminal title with git-prompt
[[ $- == *i* ]] && source "$HOME/Code/opensource/git-prompt/git-prompt.sh"
# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
# Add RVM to PATH for scripting
PATH=$PATH:$HOME/.rvm/bin
# source purely local additions
if [ -e "$HOME/.bash/local" ]; then
source "$HOME/.bash/local"
fi
# restore last saved path
if [ -f ~/.last_dir ]; then
cd `cat ~/.last_dir`
rm ~/.last_dir
fi