class ZshSyntaxHighlighting < Formula desc "Fish shell like syntax highlighting for zsh" homepage "https://github.com/zsh-users/zsh-syntax-highlighting" url "https://github.com/zsh-users/zsh-syntax-highlighting.git", :tag => "0.5.0", :revision => "15d4587514a3beaa13972093e335bf685b6726a9" head "https://github.com/zsh-users/zsh-syntax-highlighting.git" bottle do cellar :any_skip_relocation sha256 "d83cf047c3da6c7901f625e9993557523740c84b8988cda986e255330bd03c93" => :sierra sha256 "d83cf047c3da6c7901f625e9993557523740c84b8988cda986e255330bd03c93" => :el_capitan sha256 "d83cf047c3da6c7901f625e9993557523740c84b8988cda986e255330bd03c93" => :yosemite end def install system "make", "install", "PREFIX=#{prefix}" end def caveats <<-EOS.undent To activate the syntax highlighting, add the following at the end of your .zshrc: source #{HOMEBREW_PREFIX}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh You will also need to force reload of your .zshrc: source ~/.zshrc Additionally, if your receive "highlighters directory not found" error message, you may need to add the following to your .zshenv: export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=#{HOMEBREW_PREFIX}/share/zsh-syntax-highlighting/highlighters EOS end test do assert_match "#{version}\n", shell_output("zsh -c '. #{pkgshare}/zsh-syntax-highlighting.zsh && echo $ZSH_HIGHLIGHT_VERSION'") end end