-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrc
89 lines (75 loc) · 2.49 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
export EDITOR="nvim"
source ~/.aliases
set -o vi
shopt -s autocd cdspell checkjobs direxpand dirspell nocaseglob nocasematch
# ==================
# tmux
# =================
export TERM="xterm-256color"
export PLATFORM="mac" # used by powerline
# ====================
# git
# ====================
source ~/.git_prompt
git_prompt="\$(git_info)"
if [[ $git_prompt != "" ]]; then
export PS1="$git_prompt\W \$ "
else
export PS1="\W \$ "
fi
export PS1="$PS1"'$([ -n "$TMUX" ] && tmux setenv TMUXPWD_$(tmux display -p "#D" | tr -d %) "$PWD")'
# ====================
# brew
# ====================
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
PATH=$HOME/bin:/usr/local/bin:$PATH:
PATH=$HOME/.nodebrew/current/bin:$PATH
# =====================
# RBENV
# ====================
export RBENV_ROOT=/usr/local/var/rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export CONFIGURE_OPTS="--with-readline-dir=/usr/local/opt/readline --with-gcc=clang --with-openssl-dir=/usr/local/opt/openssl"
# Following line is commented out, because the brew look up was slowing down bash startup
# export CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline` --with-gcc=clang --with-openssl-dir=`brew --prefix openssl`"
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix [email protected])"
# ====================
# heroku
# ====================
export PATH="~/.bin:/usr/local/heroku/bin:$PATH"
# ====================
# pg
# ====================
export PATH=$PATH:/usr/local/opt/postgresql@10/bin
# ====================
# nvm
# ===================
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --no-use # This loads nvm without use until manuall called
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# ====================
# fzf ripgrep
# ====================
export FZF_DEFAULT_COMMAND='rg --files --follow --hidden'
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
# =================
# history
# ================
shopt -s histappend cmdhist
export HISTSIZE=5000
export HISTFILESIZE=10000
export HISTCONTROL=ignoreboth:erasedups
PROMPT_COMMAND='history -a'
# ===================
# bash completion
# ===================
for bcfile in /usr/local/etc/bash_completion.d/* ; do
[ -f "$bcfile" ] && . $bcfile
done
# ====================
# local bashrc
# ====================
if [ -f ~/.dotfiles.local/bashrc ]
then
source ~/.dotfiles.local/bashrc
fi