mirror of
https://github.com/dandavison/delta.git
synced 2024-10-05 04:17:21 +03:00
26 lines
862 B
Ruby
26 lines
862 B
Ruby
class GitDelta < Formula
|
|
version "0.0.2"
|
|
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 "32ef2f3c894206ebd11dd5d4a15a7337125f8d58efceca163d27d041ef64042c"
|
|
elsif OS.linux?
|
|
url "https://github.com/dandavison/delta/releases/download/#{version}/delta-#{version}-x86_64-unknown-linux-musl.tar.gz"
|
|
sha256 "f7253dab9e689e96b72ca1b935f84aeee5eb03223217826bd8339ae87f37982e"
|
|
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 --help"
|
|
end
|
|
end
|