blob: dfb7b5bca42cb1f63d6dc69940f2bb8ef4cd3cce (
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.14"
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 "d750b3b9dd405b5554c1579b5dad41cecafe81eb539c009ed5175431637b431c"
elsif OS.linux?
url "https://github.com/dandavison/delta/releases/download/#{version}/delta-#{version}-x86_64-unknown-linux-musl.tar.gz"
sha256 "3ebd9bf761b0e408fb64f00e50dd79a3c0276fb05212e49abef22b2da65cd35f"
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
|