-
Notifications
You must be signed in to change notification settings - Fork 0
/
bash_profile
executable file
·76 lines (58 loc) · 2.19 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
alias ls="ls -FG"
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
set +H
shopt -s histappend
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$HOME/.dotfiles/bin:$PYENV_ROOT/bin:$HOME/.cargo/bin:/usr/local/opt:/usr/local/bin:/usr/local/sbin:/usr/local/lib/node:$PATH"
export EDITOR='code --wait'
export GUI_EDITOR=$EDITOR
export THOR_MERGE=$EDITOR' -d $1 $2'
export GPG_TTY=$(tty)
export BASH_SILENCE_DEPRECATION_WARNING=1
if [[ -f /opt/homebrew/bin/brew ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
if [[ -f ~/.cargo/env ]]; then
source /Users/dana/.cargo/env
fi
if [[ ! -z "$(which pyenv)" ]]; then
eval "$(pyenv init -)"
if [[ ! -z "$(which pyenv-virtualenv-init)" ]]; then
eval "$(pyenv virtualenv-init -)";
fi
fi
source $(brew --prefix chruby)/share/chruby/chruby.sh
source $(brew --prefix chruby)/share/chruby/auto.sh
# needs to be after these other things which mess with path
export PATH="$HOME/.dotfiles/bin:$PATH"
if [[ -e /usr/local/bin/direnv ]]; then
# direnv hook bash. idk what it's doing but i'm sure it's fine
_direnv_hook() {
local previous_exit_status=$?;
eval "$("/usr/local/bin/direnv" export bash)";
return $previous_exit_status;
};
if ! [[ "${PROMPT_COMMAND:-}" =~ _direnv_hook ]]; then
PROMPT_COMMAND="_direnv_hook${PROMPT_COMMAND:+;$PROMPT_COMMAND}"
fi
fi
if [[ -f ~/.phpbrew/bashrc ]]; then
source ~/.phpbrew/bashrc
fi
. ~/.dotfiles/functions/track_bash_profile_dependency
track_source ~/.dotfiles/functions/colors
track_source ~/.dotfiles/functions/functionify
# have functions for things i call _all the time_
track_functionify_q echodo echodont echoerr be
# have functions for things called by prompt
track_functionify_q prompt_base_style
track_functionify_q prompt_version
track_functionify_q prompt_git_color git_status_clean
track_functionify_q prompt_git git_branch_name
#
# some thing just work better as functions
track_functionify_q resource # as a function it won't reset history
export PS2='\[\033[1K\r$(prompt_base_style)\]» \[\033]0m\]'
export PS1='\[\033[1K\r$(prompt_base_style)\]\w\[\033[38;5;205m\]$(prompt_version)\[$(prompt_git_color)\]$(prompt_git)\[\033[38;5;199m\]» \[\033[0m\]'
track_and_resource