-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_bashrc
More file actions
62 lines (53 loc) · 2.24 KB
/
_bashrc
File metadata and controls
62 lines (53 loc) · 2.24 KB
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
#!/usr/bin/env bash
# shellcheck source=/dev/null
# included files
if [[ -f "${HOME}"/.exports ]]; then source "${HOME}"/.exports; fi
if [[ -f "${HOME}"/.aliases ]]; then source "${HOME}"/.aliases; fi
if [[ -f "${HOME}"/.cargo/env ]]; then source "${HOME}"/.cargo/env; fi
if [[ -f "${HOME}"/.console/console.rc ]]; then source "${HOME}/.console/console.rc" 2>/dev/null; fi
if [[ -f "${HOME}"/.functions ]]; then source "${HOME}"/.functions; fi
if [[ -f "${HOME}"/.git-prompt.sh ]]; then source "${HOME}"/.git-prompt.sh; fi
if [[ -f "${HOME}"/.git-completion.bash ]]; then source "${HOME}"/.git-completion.bash; fi
if [[ -f "${HOME}"/.litarc ]]; then source "${HOME}"/.litarc; fi
# load custom path
if [[ -f "${HOME}"/.pathrc ]]; then source "${HOME}"/.pathrc; fi
# load custom prompt
if [[ -f "${HOME}"/.promptrc ]]; then source "${HOME}"/.promptrc; fi
# load local (private, machine-specific) settings
if [[ -f "${HOME}"/.localrc ]]; then source "${HOME}"/.localrc; fi
# load random scripts
if [[ -d "${HOME}"/.scripts ]]; then
for f in "${HOME}"/.scripts/*.sh; do
source "${f}"
done
fi
# load computer-specific local settings last
if [[ -f "${HOME}"/.localrc ]]; then source "${HOME}"/.localrc; fi
# bash completion
[[ -f /usr/local/etc/bash_completion ]] && . /usr/local/etc/bash_completion
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
# homebrew
eval "$(/opt/homebrew/bin/brew shellenv)"
# mise-en-place is the NEW uber version control manager
# buf if it doesn't exist, then...
if hash "${HOME}"/.local/bin/mise 2>/dev/null; then
eval "$(/Users/mchadwick/.local/bin/mise activate bash)"
else
# asdf is the uber version control manager
# but if it doesn't exist, check for others
if hash /opt/homebrew/bin/asdf 2>/dev/null; then
. /opt/homebrew/opt/asdf/libexec/asdf.sh
else
# nvm - Node version manager
if hash "${HOME}"/.nvm 2>/dev/null; then
export NVM_DIR="${HOME}/.nvm"
[[ -s "${NVM_DIR}/nvm.sh" ]] && \. "${NVM_DIR}/nvm.sh"
[[ -s "${NVM_DIR}/bash_completion" ]] && \. "${NVM_DIR}/bash_completion"
fi
# rbenv - Ruby version manager
if hash rbenv 2>/dev/null; then
export PATH="${PATH}:${HOME}/.rbenv/bin"
eval "$(rbenv init -)"
fi
fi
fi