From f6557932e9f8e4366198856baff92ec3afbe5b5c Mon Sep 17 00:00:00 2001 From: Alberto Gireud Date: Thu, 22 Oct 2015 11:15:14 -0500 Subject: [PATCH] Add OSX support for command-not-found --- plugins/command-not-found/command-not-found.plugin.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh index 797554a1..0e2f2133 100644 --- a/plugins/command-not-found/command-not-found.plugin.zsh +++ b/plugins/command-not-found/command-not-found.plugin.zsh @@ -23,3 +23,11 @@ if [ -f /usr/libexec/pk-command-not-found ]; then return $retval } 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 +fi