summaryrefslogtreecommitdiff
path: root/plugins/command-not-found
diff options
context:
space:
mode:
authorAlberto Gireud <agireud@gmail.com>2015-10-22 11:15:14 -0500
committerAlberto Gireud <agireud@gmail.com>2015-11-02 01:32:15 -0600
commitf6557932e9f8e4366198856baff92ec3afbe5b5c (patch)
treececc70c75c1f986f7d352de7cf333d2eb18e2fbe /plugins/command-not-found
parente44aa50301cbdb9c713193263e6c0c5a9a5798c0 (diff)
downloadzsh-f6557932e9f8e4366198856baff92ec3afbe5b5c.tar.gz
zsh-f6557932e9f8e4366198856baff92ec3afbe5b5c.tar.bz2
zsh-f6557932e9f8e4366198856baff92ec3afbe5b5c.zip
Add OSX support for command-not-found
Diffstat (limited to 'plugins/command-not-found')
-rw-r--r--plugins/command-not-found/command-not-found.plugin.zsh8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh
index 797554a13..0e2f2133f 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