Hi,
Homebrew takes too many milliseconds to load, causing many macOS terminals launch quite slowly. Homebrew is a natural candidate to lazy load, such as via zsh-defer, zinit ice wait, etc.
Unfortunately, when I prefix my Homebrew loading configuration with zsh-defer, then the PATH soon resets back to its non-Homebrew value, a few seconds after my terminal launches.
brew.sh:
#!/bin/sh
# Add Homebrew
unset INFOPATH
unset MANPATH
eval "$(/opt/homebrew/bin/brew shellenv)"
# Workaround brew updated cabal vs cabal updated cabal
PATH="$HOME/.cask/bin:$PATH"
# Prefer Homebrew GNU screen, etc.
PATH="$(brew --prefix)/opt/homebrew/bin:$PATH"
[zsh-defer] . ~/.zshenvrc.d/enabledbrew.sh performs the loading for me.
which screen reveals Homebrew GNU screen taking precedence, once.
Wait a few seconds, then which screen reverts back to Apple screen.
I tried explicitly performing export PATH, but that has no effect on this glitch.
I also tried zinit ice wait, with the same glitch as zsh-defer.
Hi,
Homebrew takes too many milliseconds to load, causing many macOS terminals launch quite slowly. Homebrew is a natural candidate to lazy load, such as via zsh-defer, zinit ice wait, etc.
Unfortunately, when I prefix my Homebrew loading configuration with
zsh-defer, then the PATH soon resets back to its non-Homebrew value, a few seconds after my terminal launches.brew.sh:
[
zsh-defer]. ~/.zshenvrc.d/enabledbrew.shperforms the loading for me.which screenreveals Homebrew GNU screen taking precedence, once.Wait a few seconds, then
which screenreverts back to Apple screen.I tried explicitly performing
export PATH, but that has no effect on this glitch.I also tried zinit ice wait, with the same glitch as zsh-defer.