From 95688cd72e318fca1cb2a0652e48c5d4db5a1466 Mon Sep 17 00:00:00 2001 From: Zach Whaley Date: Thu, 8 Dec 2016 07:20:40 -0600 Subject: [PATCH] formula: Add convenience method for installing Zsh functions --- Library/Homebrew/formula.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 3f2653e4ab..bfaa41ad34 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -778,6 +778,14 @@ class Formula HOMEBREW_PREFIX+"var" end + # The directory where the formula's ZSH function files should be + # installed. + # This is symlinked into `HOMEBREW_PREFIX` after installation or with + # `brew link` for formulae that are not keg-only. + def zsh_function + share+"zsh/site-functions" + end + # The directory where the formula's fish function files should be # installed. # This is symlinked into `HOMEBREW_PREFIX` after installation or with