fix(bash): auto-exec zsh in Codespaces, add .bashrc
.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>
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
# 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"
|
||||
|
||||
|
||||
2
home/.bashrc
Normal file
2
home/.bashrc
Normal file
@@ -0,0 +1,2 @@
|
||||
# Non-login shells read .bashrc; source .bash_profile for unified setup
|
||||
[ -f "$HOME/.bash_profile" ] && source "$HOME/.bash_profile"
|
||||
Reference in New Issue
Block a user