blob: 5d25a07edb9a6ec00d0a9da87dbfb0c36779a149 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
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
|