class GitDelta < Formula version "0.0.4" desc "A syntax-highlighting pager for git" homepage "https://github.com/dandavison/delta" if OS.mac? url "https://github.com/dandavison/delta/releases/download/#{version}/delta-#{version}-x86_64-apple-darwin.tar.gz" sha256 "ed3bf84c991afb21d5565781dcfc62a63d7f46ee66c69d1b94b0130903578f42" elsif OS.linux? url "https://github.com/dandavison/delta/releases/download/#{version}/delta-#{version}-x86_64-unknown-linux-musl.tar.gz" sha256 "73c205d2ca0c46c06ed91db064531fc672487c0cfb67cae5650fd6ace4b75f64" end conflicts_with "delta" def install bin.install "delta" ohai "To configure git to use delta, run:" ohai "git config --global core.pager \"delta --dark\" # --light for light terminal backgrounds" end test do shell_output "#{bin}/delta --compare-themes" end end