浏览代码

Merge pull request #4537 from agireud/command-not-found-OSX

Add OSX support for command-not-found
Marc Cornellà 8 年之前
父节点
当前提交
4b9bc91ce4
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      plugins/command-not-found/command-not-found.plugin.zsh

+ 8 - 0
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