.zshenv runs brew shellenv for every zsh, including non-interactive and GUI-launched shells; without a safe CWD the eval fails or triggers a permission prompt when launched from a TCC-protected directory such as ~/Documents. Run it from /tmp. The eza `l` alias (and the myip/e/ip/a/aa group) was defined before oh-my-zsh loaded, so lib/directories.zsh overrode `l` back to ls. Move the alias block after the oh-my-zsh source so the eza versions win. Also document the ~/.config/zshrc personal-config mechanism and patch.sh in the README, which previously only had a title. Co-authored-by: Cursor <cursoragent@cursor.com>
9 lines
453 B
Bash
9 lines
453 B
Bash
# Homebrew on macOS. .zshenv runs for every zsh (interactive, scripts, GUI-launched),
|
|
# and brew shellenv needs a readable CWD: cd to a safe dir first so launching from a
|
|
# TCC-protected directory (e.g. ~/Documents) does not break the eval or prompt for access.
|
|
if [ -x /opt/homebrew/bin/brew ]; then
|
|
eval "$(cd /tmp && /opt/homebrew/bin/brew shellenv)"
|
|
elif [ -x /usr/local/bin/brew ]; then
|
|
eval "$(cd /tmp && /usr/local/bin/brew shellenv)"
|
|
fi
|