Closed unphased closed 5 days ago
I believe a standard pattern is intended to fulfill my need, so I will close this but please do feel free to add any suggestions.
git log -p | delta
does the trick for me and i can keep piping that on to do whatever I need. E.g.: git log -p | delta | sed s/a/z/g
note to onlookers, yeah i went down this path without reviewing documentation, hyperlinks had been added to delta like a year ago, and it is quite nearly enough for what i need. So don't be like me...
I have a huge and simple feature I want to add to delta git log browsing which is to enable OSC8 Hyperlink support in the files listed in delta's diffs.
Delta is my go-to git diff browser. Now that I use AI to write code more than I manually edit code, I spend a lot less time viewing git diffs via
git diff
and more time viewing diffs ingit log -p
. But that doesn't matter. For bothgit diff
andgit log -p
the most practical way to add hyperlink support (which needs some custom reconciliation with code I've hooked into alacritty which does some slick logic for choosing the correct nvim instance to puppeteer) I need to just send the output ofgit diff
andgit log -p
(in particular rendered viadelta
) into a shell script so I can do some simple work withsed
to have all file paths become properly hyperlinked.This is proving difficult as once you run either of these from a shell script they will not get
delta
pager goodies. I can't get it by specifying GIT_PAGER as delta either though that was a long shot anyway. I'd like for there to exist a way to force git to produce a diff or log with the usual features (ability to specify more flags if necessary) but while forcing delta on always.It may be possible to use some PTY wrapper tool but this is not the answer, because it would be only be receiving just the first page of the paged output.