f6557932e9f8e4366198856baff92ec3afbe5b5c
- Author
- Alberto Gireud <agireud@gmail.com>
- Committer
- Alberto Gireud <agireud@gmail.com>
- Date
Message
Add OSX support for command-not-found
Diff
1diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh
2index 797554a13e3501787763a03d79e019d93f0261d9..0e2f2133f15dca6291e7ef7c6cf98370732cd534 100644
3--- a/plugins/command-not-found/command-not-found.plugin.zsh
4+++ b/plugins/command-not-found/command-not-found.plugin.zsh
5@@ -23,3 +23,11 @@ if [ -f /usr/libexec/pk-command-not-found ]; then
6 return $retval
7 }
8 fi
9+
10+# OSX command-not-found support
11+# https://github.com/Homebrew/homebrew-command-not-found
12+if type brew &> /dev/null; then
13+ if brew command command-not-found-init > /dev/null 2>&1; then
14+ eval "$(brew command-not-found-init)";
15+ fi
16+fi