-
Notifications
You must be signed in to change notification settings - Fork 1
/
bash_profile
59 lines (49 loc) · 1.39 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
echo "bash_profile \$HOME='$HOME', ~='$(ls -d ~)'" >>/tmp/new.log
export HISTCONTROL=ignoreboth
umask 022
export DISPLAY=:0
if ! $(pgrep ssh-agent &>/dev/null); then
eval "$(ssh-agent)"
fi
if test $SHLVL -le 4; then
# 1 is first shell, 2 is first shell in screen, 4 is first shell in tmux
# be sure not to export
IGNOREEOF=3
fi
export PATH
update_path() {
if test -d "$1" ; then
case ":$PATH:" in
*:$1:*) ;; # already in
*) export PATH="$1:$PATH" ;;
esac
fi
}
# homebrew
update_path /usr/local/bin
# new "standard"
update_path "$HOME/.local/bin"
# my stuff
update_path $HOME/bin
if test "${OSTYPE}" != "${OSTYPE#darwin}" ; then
function mdhere () { mdfind -onlyin . "$@" ; }
export mdhere
fi
export GOPATH=$HOME/go
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
# Misc local files (*.rc for bashrc time, *.sh for bash_profile time)
for f in ~/.local/etc/profile.d/*.sh; do
source $f
done
# wait to do this until path is set
#[ -r /etc/profile ] && . /etc/profile
[ -r ~/.bashrc ] && . ~/.bashrc
if [ -r "/usr/local/opt/nvm/nvm.sh" -a -z "$NVM_DIR" ]; then
export NVM_DIR="$HOME/.nvm"
. "/usr/local/opt/nvm/nvm.sh"
fi
# Misc local files (*.rc for bashrc time, *.sh for bash_profile time)
for f in ~/.local/etc/profile.d/*.rc; do
source $f
done
export PATH="$HOME/.cargo/bin:$PATH"