From 1f8fd2a9ef72a860e5775bcd64b4600d41e3b52e Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 9 Dec 2020 11:47:48 +0000 Subject: [PATCH] caveats: remove ZSH FPATH logic. This is too error-prone and full of edge cases. Fixes #9455 --- Library/Homebrew/caveats.rb | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index a80b49aa4398c..205ae5f64338b 100644 --- a/Library/Homebrew/caveats.rb +++ b/Library/Homebrew/caveats.rb @@ -128,21 +128,10 @@ def function_completion_caveats(shell) #{root_dir}/etc/bash_completion.d EOS when :zsh - site_functions = root_dir/"share/zsh/site-functions" - zsh_caveats = +<<~EOS + <<~EOS zsh #{installed.join(" and ")} have been installed to: - #{site_functions} + #{root_dir}/share/zsh/site-functions EOS - zsh = which("zsh") || which("zsh", ENV["HOMEBREW_PATH"]) - if zsh.present? && Utils.popen_read("'#{zsh}' -ic 'echo $FPATH'").exclude?(site_functions.to_s) - zsh_caveats << <<~EOS - - #{site_functions} is not in your zsh FPATH! - Add it by following these steps: - #{Formatter.url("https://docs.brew.sh/Shell-Completion#configuring-completions-in-zsh")} - EOS - end - zsh_caveats.freeze when :fish fish_caveats = +"fish #{installed.join(" and ")} have been installed to:" fish_caveats << "\n #{root_dir}/share/fish/vendor_completions.d" if completion_installed