-
Notifications
You must be signed in to change notification settings - Fork 2
/
bashrc
95 lines (78 loc) · 2.81 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
89
90
91
92
93
94
95
# bump the history size
HISTFILESIZE=1000000
# set aliases
alias ll='ls -lh'
alias grep='grep --color=auto'
alias gh='history | grep'
alias vi='nvim'
alias vim='nvim'
# set color options
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
# set vim mode
set -o vi
bind -m vi-insert "\C-l":clear-screen
# parse git branch using git_ps1 and set prompt
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
add_venv_info () {
if [ -z "$VIRTUAL_ENV_DISABLE_PROMPT" ] ; then
VIRT_ENV_TXT=""
if [ "x" != x ] ; then
VIRT_ENV_TXT=""
else
if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then
# special case for Aspen magic directories
# see http://www.zetadev.com/software/aspen/
VIRT_ENV_TXT="[`basename \`dirname \"$VIRTUAL_ENV\"\``]"
elif [ "$VIRTUAL_ENV" != "" ]; then
VIRT_ENV_TXT="(`basename \"$VIRTUAL_ENV\"`)"
fi
fi
if [ "${VIRT_ENV_TXT}" != "" ]; then
echo ${VIRT_ENV_TXT}" "
fi
fi
}
green=$(tput setaf 2)
blue=$(tput setaf 4)
yellow=$(tput setaf 3)
cyan=$(tput setaf 6)
reset=$(tput sgr0)
if [ -f $(brew --prefix)/etc/bash_completion ]; then
source $(brew --prefix)/etc/bash_completion
source $(brew --prefix)/etc/bash_completion.d/git-completion.bash
source $(brew --prefix)/etc/bash_completion.d/git-prompt.sh
fi
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWCOLORHINTS=1
GIT_PS1_SHOWUPSTREAM="auto"
GIT_PS1_SHOWUNTRACKEDFILES=1
PROMPT_COMMAND='__git_ps1 "\[$green\]\u@\h\[$reset\] \[$blue\]\w\[$reset\] " "\n$(add_venv_info)\[$cyan\]$\[$reset\] " "\[$yellow\][\[$reset\]%s\[$yellow\]]\[\$reset\]"'
# setting up pyenv
export PYENV_ROOT=$HOME/.pyenv
# setting python and go env variables and path profiles
export PATH=/usr/local/bin:/usr/local/sbin:$HOME/bin:$PATH
export PATH=$PYENV_ROOT/bin:$PATH
export GOPATH=$HOME/Projects/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:/usr/local/opt/go/libexec/bin
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Projects
export JAVA_HOME=$(/usr/libexec/java_home)
export HOMEBREW_EDITOR=nvim
export EDITOR=nvim
# adding latex path
export PATH=/usr/local/texlive/2019basic/bin/x86_64-darwin:$PATH
# added by Snowflake SnowSQL installer v1.0
export PATH=/Applications/SnowSQL.app/Contents/MacOS:$PATH
# initializing pyenv
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
if which pyenv > /dev/null; then eval "$(pyenv virtualenv-init -)"; fi
pyenv global 3.7.4 2.7.14
# setting up pipenv
export PIPENV_VERBOSITY=-1
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
export PATH="$HOME/.rbenv/bin:$PATH"
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix [email protected])"