-
Notifications
You must be signed in to change notification settings - Fork 1
/
bash_profile
48 lines (38 loc) · 885 Bytes
/
bash_profile
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
# bash aliases
if [ -f "$HOME/.bash_aliases" ]; then
. "$HOME/.bash_aliases"
fi
# bash colors
if [ -f "$HOME/.bash_colors" ]; then
. "$HOME/.bash_colors"
fi
# git bash completion
if [ -f "$(brew --prefix)/etc/bash_completion" ]; then
. "$(brew --prefix)/etc/bash_completion"
fi
# git prompt
if [ -f /usr/local/etc/bash_completion.d/git-prompt.sh ]; then
. /usr/local/etc/bash_completion.d/git-prompt.sh
fi
# enable ** recursive dir globbing
shopt -s globstar
# add GNU coreutils to path
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"
# vim
export EDITOR="vim"
# gpg
export GPG_TTY="$(tty)"
# prompt
export PS1="\w \$ "
# stop tilde expansion
_expand() {
return 0
}
# fix git typos
# i.e. turn gi t<cmd> into git <cmd>
gi() {
args=("$@")
args[0]="${args[0]/t/}"
git "${args[@]}"
}