diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh index dd1186e44..81d76e638 100644 --- a/plugins/command-not-found/command-not-found.plugin.zsh +++ b/plugins/command-not-found/command-not-found.plugin.zsh @@ -26,10 +26,8 @@ fi # OSX command-not-found support # https://github.com/Homebrew/homebrew-command-not-found -if type brew &> /dev/null; then - if brew command command-not-found-init > /dev/null 2>&1; then - eval "$(brew command-not-found-init)"; - fi +if [[ -s '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh' ]]; then + source '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh' fi # NixOS command-not-found support