-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
70 lines (58 loc) · 1.48 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
#!/usr/bin/env bash
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
PS1='[\u@\h \W]\$ '
# set alias
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# set secrets
if [ -f ~/.bash_secrets ]; then
. ~/.bash_secrets
fi
if [ -f /usr/share/nvm/init-nvm.sh ]; then
. /usr/share/nvm/init-nvm.sh
fi
# set fzf
if [ -f /usr/share/fzf/completion.bash ]; then
. /usr/share/fzf/completion.bash
fi
if [ -f /usr/share/fzf/key-bindings.bash ]; then
. /usr/share/fzf/key-bindings.bash
fi
if [ -f /usr/share/bash-completion/completions/git ]; then
. /usr/share/bash-completion/completions/git
fi
# if [ -f "${HOME}/.cargo/env" ]; then
# . "${HOME}/.cargo/env"
# fi
# pyenv configs
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/opt/miniconda3/etc/profile.d/conda.sh" ]; then
. "/opt/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/opt/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# share history among multiple tmux session
function share_history {
history -a
history -c
history -r
}
PROMPT_COMMAND='share_history'
shopt -u histappend
export HISTSIZE=9999