-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_bash_profile.tmpl
More file actions
100 lines (79 loc) · 2.44 KB
/
dot_bash_profile.tmpl
File metadata and controls
100 lines (79 loc) · 2.44 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
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
# Bash config
export BASH_SILENCE_DEPRECATION_WARNING=1
HISTCONTROL=ignorespace
FIGNORE=".DS_Store:.gitkeep"
export PATH=${PATH}:${HOME}/bin:${HOME}/.local/bin
. ${HOME}/.bash_aliases
{{- if eq .chezmoi.os "darwin" }}
# Homebrew setup and config
# https://docs.brew.sh/Manpage#environment
export HOMEBREW_NO_ENV_HINTS=1
export HOMEBREW_NO_EMOJI=1
export HOMEBREW_API_AUTO_UPDATE_SECS=$(echo 60*60*48 | bc)
export HOMEBREW_GIT_EMAIL={{ .email | quote }}
export HOMEBREW_GIT_NAME="Tim Potter"
export HOMEBREW_CASK_OPTS="--appdir=~/Applications"
# Figure out Homebrew location from the three possible places it's
# likely to be in
BREW=$(whereis -bq \
-B /usr/local/brew/bin /opt/homebrew/bin ${HOME}/homebrew/bin \
-f brew)
if [ -x ${BREW} ]; then
eval "$(${BREW} shellenv)"
fi
# Bash completion setup
if [ -f "${HOMEBREW_PREFIX}/etc/bash_completion" ]; then
source "${HOMEBREW_PREFIX}/etc/bash_completion"
fi
# Rustup setup
export PATH="${HOMEBREW_PREFIX}/opt/rustup/bin:${PATH}"
# Rancher Desktop setup and config
export PATH="${HOME}/.rd/bin:${PATH}"
if [ -e ${HOME}/.rd/docker.sock ]; then
export DOCKER_HOST=unix://${HOME}/.rd/docker.sock
fi
# nvm setup
if [ -e ${HOMEBREW_PREFIX}/opt/nvm ]; then
export NVM_DIR="$HOME/.nvm"
[ -s "${HOMEBREW_PREFIX}/opt/nvm/nvm.sh" ] && source "${HOMEBREW_PREFIX}/opt/nvm/nvm.sh" # This loads nvm
[ -s "${HOMEBREW_PREFIX}/opt/nvm/etc/bash_completion.d/nvm" ] && source "${HOMEBREW_PREFIX}/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
fi
# fzf setup
if which -s fzf; then
eval "$(fzf --bash)"
fi
# carapace setup
if which -s carapace; then
source <(carapace _carapace bash)
fi
# pyenv setup
if which -s pyenv; then
export PYENV_ROOT="${HOME}/.pyenv"
[[ -d ${PYENV_ROOT}/bin ]] && export PATH="${PYENV_ROOT}/bin:${PATH}"
eval "$(pyenv init -)"
fi
# Direnv setup
if which -s direnv; then
eval "$(direnv hook bash)"
fi
{{- end }}
# Helm completion
if which -s helm; then
eval "$(helm completion bash)"
fi
# Terraform completions
if which -s terraform; then
alias tf=terraform
complete -C $(which terraform) terraform
complete -C $(which terraform) tf
fi
# aws-vault setup
export AWS_VAULT_KEYCHAIN_NAME=login
# OpenCode setup
export PATH=$PATH:${HOME}/.opencode/bin
# Managed higher up but keep Rancher install script happy
if false; then
### MANAGED BY RANCHER DESKTOP START (DO NOT EDIT)
export PATH="/Users/$USER/.rd/bin:$PATH"
### MANAGED BY RANCHER DESKTOP END (DO NOT EDIT)
fi