perf(completion): let Oh My Zsh own initialization

A single completion setup avoids duplicate initialization. Homebrew already exports its prefix during environment setup, so resolving it again adds an unnecessary subprocess.
This commit is contained in:
Yuhao Qing
2026-09-08 00:41:09 +08:00
parent d5afd25bbe
commit 1ba7380ac5
+2 -5
View File
@@ -40,13 +40,10 @@ plugins=(
fpath+=$ZSH/custom/plugins/zsh-completions/src
if [[ "$OSTYPE" == "darwin"* ]] && command -v brew &> /dev/null; then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
if [[ "$OSTYPE" == "darwin"* && -n "$HOMEBREW_PREFIX" ]]; then
fpath=("$HOMEBREW_PREFIX/share/zsh/site-functions" ${fpath:#$HOMEBREW_PREFIX/share/zsh/site-functions})
fi
mkdir -p ~/.cache/zsh
autoload -U compinit && compinit -C -d ~/.cache/zsh/.zcompdump
SAVEHIST=50000
cheat() {