-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbashrc.symlink
152 lines (128 loc) · 3.91 KB
/
bashrc.symlink
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
export DOTFILES=$HOME/dotfiles
# Things I can't share with the outer world ;)
if [ -f ~/.localrc ]
then
. ~/.localrc
fi
UNAME=$(uname -s)
# completion
if [ "$UNAME" == "Darwin" ]; then
if [ -f /opt/local/etc/profile.d/bash_completion.sh ]; then
. /opt/local/etc/profile.d/bash_completion.sh
fi
elif [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
# bash_completion is unsetting uname at the end
UNAME=$(uname -s)
. $DOTFILES/bash/git-completion.bash
if [ -f /opt/local/share/bash-completion/completions/git ]
then
. /opt/local/share/bash-completion/completions/git
fi
if [ -f /opt/local/share/bash-completion/rg ]
then
. /opt/local/share/bash-completion/rg
fi
. $DOTFILES/bash/aliases
. $DOTFILES/bash/functions
. $DOTFILES/bash/colours
. $DOTFILES/bash/svn-colours
# prompt must be sourced after colours definitions
. $DOTFILES/bash/prompt
#. $DOTFILES/bash/bash-git-prompt/gitprompt.sh
if [ -f "$HOME/bash-git-prompt/gitprompt.sh" ]; then
GIT_PROMPT_ONLY_IN_REPO=1
GIT_PROMPT_THEME=Carlo
source $HOME/bash-git-prompt/gitprompt.sh
fi
# mac
if [ "$UNAME" == "Darwin" ]
then
# ruby MacOS
[[ -s "/Users/carlo/.rvm/scripts/rvm" ]] && source "/Users/carlo/.rvm/scripts/rvm"
# Java
export JAVA_HOME=`/usr/libexec/java_home`
launchctl setenv PATH $PATH
export PATH=~/.pyenv/bin:$DOTFILES/bin:$PATH:/usr/local/mysql/bin::/opt/local/bin:~/bin:$ANT_HOME/bin:$HOME/.istioctl/bin:$PATH
# pyenv initialization
#eval "$(pyenv init -)"
#eval "$(pyenv virtualenv-init -)"
# compiler settings
export LDFLAGS='-L/opt/local/lib'
export CPPFLAGS='-I/opt/local/include'
export LD_LIBRARY_PATH=/opt/local/lib
export LD_INCLUDE_PATH=/opt/local/include
# extssh su linux, ext su MacOS
export CVSROOT=":ext:cbertold@192.168.0.21:/CVS_JAVA_LAB"
export CVS_RSH=ssh
export TMP=/tmp/
export EDITOR="/Applications/MacVim.app/Contents/MacOS/Vim"
export SVN_EDITOR="/Applications/MacVim.app/Contents/MacOS/Vim"
# Linux wants LS_COLORS with a different syntax
export LSCOLORS="exgxcxdxcxegedabagacad"
elif [ "$UNAME" == "Linux" ]
then
export EDITOR=vim
export VISUAL=vim
export SVN_EDITOR=vim
export PATH=~/bin:$PATH:$ANT_HOME/bin
else
export JAVA_HOME="/usr/lib/jvm/java-8-oracle"
export PATH=~/bin:$PATH
fi
export set JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8"
# erlang
alias erl14a=". ~/.kerl/install/r14a/activate"
alias erl14b03=". ~/.kerl/install/r14b03/activate"
alias erl14b04=". ~/.kerl/install/r14b04/activate"
alias erl15b=". ~/.kerl/install/r15b/activate"
# larger history file
export HISTSIZE=32768
export HISTFILESIZE=$HISTSIZE HISTFILESIZE
# commands not to be saved in history
export HISTIGNORE="&:ls:pwd:[bf]g:exit:j:fg [0-9]*:date:cd:cd -:cls:.."
export HISTCONTROL=ignoreboth:erasedups
# files to ignore with tab completion
export FIGNORE=$FIGNORE:DS_Store
shopt -s nocaseglob
shopt -s cdspell
shopt -s extglob
shopt -s histappend
# Enable some Bash 4 features when possible:
# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
# * Recursive globbing, e.g. `echo **/*.txt`
for option in autocd globstar; do
shopt -s "$option" 2> /dev/null
done
set -o vi
export GREP_OPTIONS='--color=auto'
# highlight matches in yellow
export GREP_COLOR='00;38;5;226'
export LANG="en_US"
export LANGUAGE="en_US"
export LC_ALL="en_US.UTF-8"
if [ "$UNAME" == "Darwin" ]
then
export TERM=xterm-256color
if [ -e /usr/share/terminfo/x/xterm-256color ]
then
export TERM='xterm-256color'
elif [[ $(toe | grep -m 1 256) ]]
then
export TERM='screen-it-256color'
else
export TERM='xterm-color'
fi
elif [ -n "$COMSPEC" -a -x "$COMSPEC" ]
then
export TERM="cygwin"
fi
if [ -f ~/.ripgreprc ]; then
export RIPGREP_CONFIG_PATH=~/.ripgreprc
fi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
export TF_PLUGIN_CACHE_DIR="$HOME/.terraform_cache"
complete -C ~/bin/terraform terraform