shell: launch zsh if we can

This commit is contained in:
PowerUser64 2024-09-16 11:50:19 -07:00
parent 3d44475583
commit b6ca38a4b5
3 changed files with 13 additions and 0 deletions

View file

@ -75,6 +75,9 @@ if test -n "${ZSH_VERSION:-}"; then
export NIX_BUILD_SHELL=zsh export NIX_BUILD_SHELL=zsh
fi fi
# Launch zsh if we haven't yet
LAUNCH_ZSH="${LAUNCH_ZSH:-true}"
# Basic default LS colors # Basic default LS colors
export LSCOLORS="Gxfxcxdxbxegedabagacad" export LSCOLORS="Gxfxcxdxbxegedabagacad"

View file

@ -13,3 +13,11 @@ if command -v zoxide > /dev/null 2>&1 || ${SKIP_ZOXIDE:-false}; then
eval "$(zoxide init posix --hook prompt)" eval "$(zoxide init posix --hook prompt)"
fi fi
fi fi
# Switch to zsh if we're told to
if [ "${LAUNCH_ZSH:-false}" = true ] && command -v zsh > /dev/null 2>&1; then
LAUNCH_ZSH=false exec zsh
fi
# terminal colorscheme
careful_source "$SHELL_CONFIG_DIR/colors.sh"

2
.zshrc
View file

@ -265,6 +265,8 @@ load_working_dir && cd - > /dev/null || true
# <<< # <<<
# <<< # <<<
export BASH_LAUNCH_ZSH=false
# Optionally source another zshrc # Optionally source another zshrc
${SKIP_LOCAL_ZSHRC:-false} || careful_source "$SHELL_CONFIG_DIR/local/zshrc" ${SKIP_LOCAL_ZSHRC:-false} || careful_source "$SHELL_CONFIG_DIR/local/zshrc"