.bash_profile execs into zsh when available (chsh doesn't persist in containers). Shows amber warning if zsh not found. .bashrc sources .bash_profile for non-login bash sessions (e.g. iTerm2 profiles with 'bash' command). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
14 lines
472 B
Bash
14 lines
472 B
Bash
# Switch to zsh if available (chsh doesn't persist in containers/Codespaces)
|
|
if [[ -z "${ZSH_VERSION:-}" ]]; then
|
|
if command -v zsh &>/dev/null; then
|
|
exec zsh -l
|
|
else
|
|
printf '\033[38;2;248;140;20m[dots] zsh not found — falling back to bash\033[0m\n' >&2
|
|
fi
|
|
fi
|
|
|
|
# Load .profile, containing login, non-bash related initializations.
|
|
[ -f "$HOME/.profile" ] && source "$HOME/.profile"
|
|
|
|
command -v mise &>/dev/null && eval "$(mise activate bash)"
|