You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 in git log -p. But that doesn't matter. For both git diff and git 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 of git diff and git log -p (in particular rendered via delta) into a shell script so I can do some simple work with sed 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.
The text was updated successfully, but these errors were encountered:
unphased
changed the title
🚀 Enable delta when viewing a delta powered git log in a shell pipeline
🚀 Enable delta when producing a git log or diff in a shell pipeline
Jun 27, 2024
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.
The text was updated successfully, but these errors were encountered: