# ~/.zshrc - installed into /etc/skel by customize_airootfs.sh (it replaces
# grml-zsh-config's skel copy; grml's global /etc/zsh/zshrc still loads first).

export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME=""                       # starship draws the prompt
zstyle ':omz:update' mode reminder # never auto-pull on startup

# Plugins are pre-cloned into $ZSH/custom/plugins at ISO build time.
# zsh-syntax-highlighting must load before zsh-history-substring-search.
# zsh-autocomplete is cloned too but left off: it must load before compinit,
# which grml's /etc/zsh/zshrc already ran, and it fights zsh-autosuggestions.
# To use it anyway, see README.md "zsh-autocomplete partial-load error".
plugins=(
  git
  fzf-zsh-plugin
  zsh-eza
  zsh-autosuggestions
  zsh-syntax-highlighting
  zsh-history-substring-search
)

source "$ZSH/oh-my-zsh.sh"

bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down

[[ -f ~/.fzf.zsh ]] && source ~/.fzf.zsh

if command -v starship >/dev/null 2>&1 && [[ "$TERM" != "linux" ]]; then
  eval "$(starship init zsh)"
fi
