From 00b084023f9c8efe890d10820f5108394fbe2afe Mon Sep 17 00:00:00 2001 From: Andrew Coleman Date: Fri, 12 Aug 2022 14:08:48 -0400 Subject: [PATCH] include freebsd /usr/home configuration --- dot_bashrc.tmpl | 9 +++++++++ 1 file changed, 9 insertions(+) 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