blob: 07c1eb89f9e84334bec24803978e0b0d4235d999 (
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.7"
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 "1e9f1878cab0878af3f3f7e68ee612d3beb97811bdcf2acd82c3137ebc180bee"
elsif OS.linux?
url "https://github.com/dandavison/delta/releases/download/#{version}/delta-#{version}-x86_64-unknown-linux-musl.tar.gz"
sha256 "783ef27d4c32cba7a1c27ab6d61edebb42a7b3044dee4fd829c38f5574cab8aa"
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
|