Skip to content
Snippets Groups Projects
Unverified Commit 1f8fd2a9 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

caveats: remove ZSH FPATH logic.

This is too error-prone and full of edge cases.

Fixes #9455
parent 37fe1502
No related branches found
No related tags found
No related merge requests found
......@@ -128,21 +128,10 @@ class Caveats
#{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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment