2021-04-12 21:56:06 -04:00
|
|
|
# If not running interactively, don't do anything
|
|
|
|
[[ $- != *i* ]] && return
|
|
|
|
|
2022-08-12 14:08:48 -04:00
|
|
|
{{- 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
|
2022-06-30 09:48:37 -04:00
|
|
|
|
|
|
|
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
|