From 38dc1a44c93367d8333e857b66347e579cd38474 Mon Sep 17 00:00:00 2001 From: Jonathan Dahan Date: Tue, 3 Nov 2015 15:04:13 -0500 Subject: [PATCH] Add homebrew-installed completions to fpath --- modules/homebrew/README.md | 3 ++- modules/homebrew/init.zsh | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/homebrew/README.md b/modules/homebrew/README.md index 84b43865..12886c04 100644 --- a/modules/homebrew/README.md +++ b/modules/homebrew/README.md @@ -1,7 +1,8 @@ Homebrew ======== -Defines Homebrew aliases. +Defines Homebrew aliases, and if loaded before the completion module, adds +homebrew-installed completions. Aliases ------- diff --git a/modules/homebrew/init.zsh b/modules/homebrew/init.zsh index 1ebe793d..dfc5e571 100644 --- a/modules/homebrew/init.zsh +++ b/modules/homebrew/init.zsh @@ -31,3 +31,7 @@ alias caski='brew cask install' alias caskl='brew cask list' alias casks='brew cask search' alias caskx='brew cask uninstall' + +if (( $+commands[brew] )); then + fpath=(`brew --prefix`/share/zsh/site-functions $fpath) +fi