diff-so-fancy 0.3.0 (new formula) #49040
Changes from 1 commit
55a8d40
d3b6c03
40cb3aa
e50a945
a37346e
8b13136
7249ac3
802b379
a40b917
2e3edf8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
class DiffSoFancy < Formula | ||
desc "builds on the good-lookin' output of diff-highlight" | ||
homepage "https://github.com/stevemao/diff-so-fancy" | ||
url "https://github.com/stevemao/diff-so-fancy/archive/v0.1.2.tar.gz" | ||
sha256 "fa4ac51368ba6b942c6b346117e5f72cabb00ea3c29f834e3c4ca80972e19502" | ||
|
||
depends_on "gnu-sed" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Run time or just build time? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, run time, looking at the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, run time. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be good to make a feature request to be able to use BSD sed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MikeMcQuaid Not likely to be worked on/accepted, the author (@paulirish) says in so-fancy/diff-so-fancy#25 "OS X sed is crap". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disappointing but: thanks. |
||
|
||
def install | ||
prefix.install Dir["*"] | ||
inreplace "#{prefix}/diff-so-fancy", "sed", "gsed" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It'll be a little cleaner to do this before you install it, and we'd prefer it to be tucked in # Short explanation like: requires functionality not offered by BSD sed.
inreplace "diff-so-fancy", "sed", "gsed"
libexec.install Dir["*"]
bin.install_symlink libexec/"diff-so-fancy" |
||
bin.install_symlink "#{prefix}/diff-so-fancy" | ||
end | ||
|
||
def caveats; <<-EOS.undent | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unless these are Homebrew-specific we prefer not to include them. People should reference upstream for general usage. |
||
You probably now want to configure git to fancify all your diffs. Run: | ||
git config --global core.pager "diff-so-fancy | less --tabs=1,5 -R" | ||
|
||
so that `git diff` will use it. You can still bypass with `git --no-pager diff`. | ||
|
||
You may also want some fancier colours. Consider trying: | ||
git config --global color.diff-highlight.oldNormal "red bold" | ||
git config --global color.diff-highlight.oldHighlight "red bold 52" | ||
git config --global color.diff-highlight.newNormal "green bold" | ||
git config --global color.diff-highlight.newHighlight "green bold 22" | ||
EOS | ||
end | ||
|
||
test do | ||
system "diff-so-fancy" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the desc to "Good-lookin' diffs with diff-highlight and more" on npm and "Unfancy git-diff" on GitHub