From 858bb2d0255c5367ecdb89eb4a7814194e0f9781 Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Sat, 11 Jul 2015 21:20:20 -0400 Subject: [PATCH] command-not-found support for OSX (homebrew) --- plugins/command-not-found/command-not-found.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh index 797554a13..4ffee994c 100644 --- a/plugins/command-not-found/command-not-found.plugin.zsh +++ b/plugins/command-not-found/command-not-found.plugin.zsh @@ -23,3 +23,9 @@ if [ -f /usr/libexec/pk-command-not-found ]; then return $retval } fi + +# OSX (brew) command-not-found suport. You must install the brew package first: +# https://github.com/Homebrew/homebrew-command-not-found +if [[ -e /usr/local/bin/brew ]] && (brew command command-not-found-init > /dev/null); then + eval "$(brew command-not-found-init)" +fi \ No newline at end of file