Re-enable p10k instant prompt (sudo-key ssh-add moved above it). Drop oh-my-zsh.sh (second compinit, update check); set up what OMZ plugins need ourselves. Cache java_home, go env, fzf --zsh output. Disable the kubecontext segment (ran kubectl per shell). Log starts over 1 s to ~/.cache/zsh/startup-slow.log to catch cold-start stalls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.2 KiB
Bash
31 lines
1.2 KiB
Bash
# Callers set plugins_txt and static_file before sourcing this module.
|
|
mkdir -p "${static_file:h}"
|
|
if [[ ! -e ${ZDOTDIR:-$HOME}/.antidote ]]; then
|
|
git clone https://github.com/mattmc3/antidote.git "${ZDOTDIR:-$HOME}/.antidote"
|
|
fi
|
|
|
|
# OMZ lib/plugins without oh-my-zsh.sh, which would set these up
|
|
ZSH_CACHE_DIR=${ZDOTDIR:-$HOME}/.cache/zsh/omz
|
|
[[ -d $ZSH_CACHE_DIR/completions ]] || mkdir -p "$ZSH_CACHE_DIR/completions"
|
|
fpath=("$ZSH_CACHE_DIR/completions" $fpath)
|
|
# ssh-agent plugin keys its env file on this; HOST changes with VPN rDNS
|
|
SHORT_HOST=${HOST/.*/}
|
|
if [[ $OSTYPE == darwin* ]] && _zsh_cached short_host \
|
|
/Library/Preferences/SystemConfiguration/preferences.plist -- scutil --get LocalHostName; then
|
|
read -r SHORT_HOST < $REPLY
|
|
fi
|
|
# OMZ calls compdef before compinit (last plugin) has run: queue, replay below
|
|
typeset -ga _compdef_queue
|
|
compdef() { _compdef_queue+=("${(j: :)${(@q)@}}") }
|
|
|
|
zstyle ':completion:*:ssh:*' hosts off
|
|
zstyle ':completion:*:scp:*' hosts off
|
|
zstyle ':completion:*:commands' rehash 1
|
|
|
|
source "${ZDOTDIR:-$HOME}/.antidote/antidote.zsh"
|
|
antidote load "$plugins_txt" "$static_file"
|
|
if (( ${+_comps} )); then
|
|
for _c in $_compdef_queue; do eval "compdef $_c"; done
|
|
unset _c _compdef_queue
|
|
fi
|