diff options
| author | Zach Whaley | 2016-12-03 20:45:54 -0600 |
|---|---|---|
| committer | Zach Whaley | 2016-12-08 07:23:26 -0600 |
| commit | 14f46625a3e734a6b0e1ecdd8f146da20de5ea96 (patch) | |
| tree | 3d6c15ee4a00c4b415207cb55d980513f29e87b3 /Library/Homebrew/caveats.rb | |
| parent | 95688cd72e318fca1cb2a0652e48c5d4db5a1466 (diff) | |
| download | brew-14f46625a3e734a6b0e1ecdd8f146da20de5ea96.tar.bz2 | |
caveats: Differentiate zsh completion files and function files
When installing a file to zsh/site-functions directory, it is assumed this is a zsh completion file,
and the zsh completion caveat is printed after installation.
But not all files in the zsh/site-functions directory are completion files.
Some are files for functions that can be loaded on demand with zsh's autoload command.
- Edit Keg.completion_installed to search specifically for files in the zsh/site-functions
directory starting with an underscore only (By convention, zsh completion files start with an underscore)
- Add Keg.zsh_functions_installed to search for non-completion files in the zsh/site-functions
- Add Caveats.zsh_function_caveats to print a caveat if non-completion files have been installed
to zsh/site-functions
Diffstat (limited to 'Library/Homebrew/caveats.rb')
| -rw-r--r-- | Library/Homebrew/caveats.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index 0b1c0fd23..3dfdb1c87 100644 --- a/Library/Homebrew/caveats.rb +++ b/Library/Homebrew/caveats.rb @@ -19,6 +19,7 @@ class Caveats caveats << bash_completion_caveats caveats << zsh_completion_caveats caveats << fish_completion_caveats + caveats << zsh_function_caveats caveats << fish_function_caveats caveats << plist_caveats caveats << python_caveats @@ -100,6 +101,16 @@ class Caveats EOS end + def zsh_function_caveats + return unless keg + return unless keg.zsh_functions_installed? + + <<-EOS.undent + zsh functions have been installed to: + #{HOMEBREW_PREFIX}/share/zsh/site-functions + EOS + end + def fish_function_caveats return unless keg return unless keg.fish_functions_installed? |
