Files
dotfiles/install.d/22-zsh.sh
Andrejus ffd26e06d6 perf(zsh): cache tool init, lazy-load, remove plugins
Startup: 150ms → 40ms (native), projected 10-30s → <1s (iSH)

- Cache mise/fzf/zoxide init output keyed on binary mtime
- zcompile all sourced files to bytecode at install time
- Lazy-load compinit (first Tab), fzf+widgets (first keystroke)
- Remove autosuggestions and syntax-highlighting plugins
- Switch mise to shims mode (no per-prompt hook)
- Conditional mkdir (skip if dirs exist)
- Remove TRAPINT/flash handler, cache session info
- Eliminate per-prompt subshell forks (REPLY pattern)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 18:08:40 +00:00

36 lines
782 B
Bash
Executable File

#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Configure zsh shell.
#
# install zsh
if ! command -v zsh &> /dev/null; then
case "$DOTS_PKG" in
apt)
sudo apt-get install -qq zsh
;;
pacman)
sudo pacman -S --noconfirm zsh
;;
brew)
brew install zsh
;;
*)
log_warn "Skipping zsh install: no supported package manager found"
return 0
;;
esac
fi
# change default shell to zsh
if [[ "$SHELL" != *zsh ]]; then
sudo chsh -s "$(command -v zsh)" "$(whoami)"
sudo usermod -s "$(command -v zsh)" "$(whoami)"
fi
log_pass "zsh configured"
zsh --version | log_quote