-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdot_bashrc.tmpl
More file actions
39 lines (32 loc) · 970 Bytes
/
dot_bashrc.tmpl
File metadata and controls
39 lines (32 loc) · 970 Bytes
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
{{- $remote := or (env "CODESPACES" | not | not) (env "SSH_CONNECTION" | not | not) (env "KUBERNETES_SERVICE_HOST" | not | not) (env "container" | not | not) (env "REMOTE_CONTAINERS" | not | not) (stat "/.dockerenv" | not | not) -}}
set -o vi
# edit PATH
if [[ -d $HOME/.local/bin ]]; then
export PATH=$HOME/.local/bin:$PATH
fi
{{if not .remote -}}
# setup gpg-agent ssh
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
{{- end}}
if command -v mise >/dev/null; then
eval "$(mise activate bash)"
fi
# (neo)vim
if command -v nvim > /dev/null ; then
export EDITOR="nvim"
export VISUAL="nvim"
elif command -v vim > /dev/null ; then
export EDITOR="vim"
export VISUAL="vim"
fi
# enable the starship prompt
if command -v starship >/dev/null; then
eval "$(starship init bash)"
fi
# use bat instead of cat
if command -v bat >/dev/null; then
alias cat="bat"
fi