dotfiles/dot_bashrc.tmpl

33 lines
799 B
Cheetah
Raw Permalink Normal View History

2021-04-12 21:56:06 -04:00
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
{{- if (eq .chezmoi.os "freebsd") -}}
# start in home directory
# shellcheck disable=SC2164
if [ "$PWD" != "$HOME" ] && [ "$PWD" -ef "$HOME" ] ; then cd ; fi
# change $HOME on FreeBSD to /usr/home/andrew
# shellcheck disable=SC2164
if [ -d "/usr$HOME" ] ; then export HOME=/usr$HOME ; cd ; fi
{{ end }}
2021-04-12 21:56:06 -04:00
# User specific aliases and functions
2022-05-10 13:58:50 -04:00
if [ -d "$HOME/.config/bash" ]; then
2022-05-10 15:34:50 -04:00
for rc in $HOME/.config/bash/*; do
2021-04-13 14:43:04 -04:00
if [ -f "$rc" ]; then
2021-05-11 12:28:44 -04:00
# shellcheck source=/dev/null
2021-04-13 14:43:04 -04:00
. "$rc"
fi
done
2021-04-12 21:56:06 -04:00
fi
unset rc
if which direnv > /dev/null 2>&1 ; then
eval "$(direnv hook bash)"
fi
if which zoxide > /dev/null 2>&1 ; then
eval "$(zoxide init bash)"
# shellcheck disable=SC2139
alias z="$(which zoxide)"
fi