class GitDelta < Formula version "0.0.15" 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 "a6df3b6d3a3698997dc84ddfe8d8880493524549138b18b9c9a48aa43c5b716f" elsif OS.linux? url "https://github.com/dandavison/delta/releases/download/#{version}/delta-#{version}-x86_64-unknown-linux-musl.tar.gz" sha256 "c2748c459a26542d3bf599b3d43320954742ac3b4e2b540a6dab980579a09d91" 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