diff options
| author | Mike McQuaid | 2017-12-24 20:40:52 +0000 | 
|---|---|---|
| committer | GitHub | 2017-12-24 20:40:52 +0000 | 
| commit | 2259e369eaa943d885605c8643819eeac00ab62e (patch) | |
| tree | 13ef3b00a0b89cc246a36100ed31b07793b4785f | |
| parent | 898981f17b21bd8caee820d8caaf6dca1e1e6c13 (diff) | |
| parent | cacefb2b99ee760b98100b7cd3664b84fe01e791 (diff) | |
| download | brew-2259e369eaa943d885605c8643819eeac00ab62e.tar.bz2 | |
Merge pull request #3590 from DomT4/completions_are_not_always_linked
caveats: correct completion/function paths for keg_only
| -rw-r--r-- | Library/Homebrew/caveats.rb | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index aad354607..ca1c2a9f8 100644 --- a/Library/Homebrew/caveats.rb +++ b/Library/Homebrew/caveats.rb @@ -86,21 +86,23 @@ class Caveats      installed << "completions" if completion_installed      installed << "functions" if functions_installed +    root_dir = f.keg_only? ? f.opt_prefix : HOMEBREW_PREFIX +      case shell      when :bash        <<~EOS          Bash completion has been installed to: -          #{HOMEBREW_PREFIX}/etc/bash_completion.d +          #{root_dir}/etc/bash_completion.d        EOS      when :zsh        <<~EOS          zsh #{installed.join(" and ")} have been installed to: -          #{HOMEBREW_PREFIX}/share/zsh/site-functions +          #{root_dir}/share/zsh/site-functions        EOS      when :fish        fish_caveats = "fish #{installed.join(" and ")} have been installed to:" -      fish_caveats << "\n  #{HOMEBREW_PREFIX}/share/fish/vendor_completions.d" if completion_installed -      fish_caveats << "\n  #{HOMEBREW_PREFIX}/share/fish/vendor_functions.d" if functions_installed +      fish_caveats << "\n  #{root_dir}/share/fish/vendor_completions.d" if completion_installed +      fish_caveats << "\n  #{root_dir}/share/fish/vendor_functions.d" if functions_installed        fish_caveats      end    end  | 
