dotfiles/dot_bashrc.tmpl

37 lines
910 B
Cheetah

{{- if (eq .chezmoi.os "linux") -}}
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export MOZ_ENABLE_WAYLAND=1
{{ end }}
# 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
if [ -f "$rc" ]; then
# shellcheck source=/dev/null
. "$rc"
fi
done
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