diff --git a/dot_bashrc.tmpl b/dot_bashrc.tmpl index 4af1f8b..fb0af8d 100644 --- a/dot_bashrc.tmpl +++ b/dot_bashrc.tmpl @@ -5,6 +5,15 @@ export MOZ_ENABLE_WAYLAND=1 # 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 }} + # User specific aliases and functions if [ -d "$HOME/.config/bash" ]; then for rc in $HOME/.config/bash/*; do