-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.bashrc.defaults
127 lines (102 loc) · 3.37 KB
/
.bashrc.defaults
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
# shellcheck shell=bash
is_mac() {
[ $(uname) == "Darwin" ]
}
# history stuff
HISTCONTROL=ignoreboth
shopt -s histappend
HISTSIZE=4000
HISTFILESIZE=8000
# shopt
shopt -s checkwinsize
shopt -s nocaseglob
shopt -s cdspell
shopt -s autocd
shopt -s globstar
# git is aliased to g so need to setup completion
setup_g_completion() {
git_compl="${1}"
if [[ -f "${git_compl}" ]]; then
source "${git_compl}"
__git_complete g __git_main
fi
}
if is_mac; then
if [[ -f "${HOME}/.bash_completion.d/git-completion.bash" ]]; then
setup_g_completion "${HOME}/.bash_completion.d/git-completion.bash"
elif [[ -f "$(brew --prefix)/etc/bash_completion.d/git-completion.bash" ]]; then
setup_g_completion "$(brew --prefix)/etc/bash_completion.d/git-completion.bash"
else
setup_g_completion "/usr/local/etc/bash_completion.d/git-completion.bash"
fi
else
setup_g_completion "/usr/share/bash-completion/completions/git"
fi
# paths and other exports
export ANDROID_HOME="${HOME}/Android/Sdk"
export PATH="${HOME}/.bin:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${PATH}:${HOME}/tools/buck/bin"
export PATH="${HOME}/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:${PATH}"
export PATH="${PATH}:${HOME}/android-studio/bin:${HOME}/.yarn/bin"
export PATH="${PATH}:${HOME}/.local/share/gem/ruby/3.0.0/bin"
export EDITOR="vim"
export ELIXIR_EDITOR="vim +__LINE__ __FILE__"
export REACT_EDITOR="vim"
export ECTO_EDITOR="vim"
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
export LANG='en_US.UTF-8'
export LC_ALL='en_US.UTF-8'
export PYTHONDONTWRITEBYTECODE=1
export PYTHONIOENCODING='UTF-8'
export NODE_REPL_HISTORY_SIZE=5000
export GOPATH="${HOME}/projects/go"
export PATH="${GOPATH}/bin:${PATH}"
export SAANCHO_CLIPBOARD="true"
export MINICOM="-m -c on"
export WORKON_HOME=~/pyenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export FZF_DEFAULT_COMMAND='ag -l --nocolor --hidden -g ""'
export COLORTERM="gnome-terminal"
export GTAGSLABEL="pygments"
export ERL_AFLAGS="-kernel shell_history enabled"
[[ -f "/usr/local/bin/virtualenvwrapper_lazy.sh" ]] && source /usr/local/bin/virtualenvwrapper_lazy.sh
[[ -f "${HOME}/.pythonrc.py" ]] && export PYTHONSTARTUP="${HOME}/.pythonrc.py"
# dotnetcore optout
export DOTNET_CLI_TELEMETRY_OPTOUT="true"
# nnn config
export NNN_TMPFILE="/tmp/nnn"
export NNN_SHOW_HIDDEN=1
export NNN_USE_EDITOR=1
export DISABLE_FILE_OPEN_ON_NAV=1
# bat pager
export BAT_PAGER="less -R --mouse"
# gpg tty for commit issue
export GPG_TTY=$(tty)
# kubernetes
complete -F __start_kubectl k
# tf completion
tf=$(command -v terraform)
[[ "$?" -eq 0 ]] && complete -C /usr/local/bin/terraform tf
source "${HOME}/.bash_prompt"
# concourse fly
command -v fly &> /dev/null && source <(fly completion --shell bash)
# starship.rs
function set_term_title() {
case $TERM in
screen*|ansi*|xterm*|rxvt*)
echo -ne "\033]0;${USER}@${HOSTNAME%%.*}: ${PWD/#$HOME/\~}\007"
;;
esac
}
if command -v starship &> /dev/null; then
starship_precmd_user_func="set_term_title"
eval "$(starship init bash)"
fi
command -v eksctl &> /dev/null && source <(eksctl completion bash)
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
command -v thefuck &> /dev/null && eval "$(thefuck --alias)"
command -v asdf &> /dev/null && source "${HOME}"/.asdf/asdf.sh && source "${HOME}"/.asdf/completions/asdf.bash
for f in ${HOME}/.functions/*; do
source $f
done
source "${HOME}/.bash_completion"