Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caveats: remove ZSH FPATH logic. #9480

Merged
merged 1 commit into from Dec 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 2 additions & 13 deletions Library/Homebrew/caveats.rb
Expand Up @@ -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
Expand Down