Files
dotfiles/common/zsh/zshrc
T
2026-10-22 09:21:55 -04:00

50 lines
1.4 KiB
Bash

# Interactive shells only.
# Arch packages oh-my-zsh system-wide; Debian/Ubuntu installs it per-user.
for _d in /usr/share/oh-my-zsh "$HOME/.oh-my-zsh"; do
[[ -d $_d ]] && { export ZSH=$_d; break }
done
unset _d
ZSH_THEME="avit"
HYPHEN_INSENSITIVE="true"
DISABLE_UPDATE_PROMPT="true"
ENABLE_CORRECTION="true"
COMPLETION_WAITING_DOTS="true"
plugins=(git)
[[ -n $ZSH && -r $ZSH/oh-my-zsh.sh ]] && source $ZSH/oh-my-zsh.sh
fpath+=~/.zsh
unsetopt correct_all
unsetopt HIST_VERIFY
unsetopt multios
# Arch nests this under plugins/; Debian/Ubuntu does not.
for _d in \
/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh \
/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
do
[[ -r $_d ]] && { source $_d; break }
done
unset _d
source "$DOTFILES/common/zsh/aliases.zsh"
for _f in "$DOTFILES/hosts/$DOTFILES_HOST"/zsh/*.zsh(N); do source "$_f"; done
unset _f
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
command -v pyenv >/dev/null 2>&1 && eval "$(pyenv init -)"
# zoxide's cd override confuses Claude Code's shell snapshotting.
[[ "$CLAUDECODE" != "1" ]] && command -v zoxide >/dev/null 2>&1 && eval "$(zoxide init --cmd cd zsh)"
command -v starship >/dev/null 2>&1 && eval "$(starship init zsh)"
source "$DOTFILES/common/zsh/opencode.zsh"
# Nudge when the repo has drifted. Silent when clean, so it means something.
command -v dots >/dev/null 2>&1 && dots --nag