💾 Archived View for heavysquare.com › notes › BEEE-easier-to-spot-eof.gmi captured on 2021-12-04 at 18:04:22. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

~~ 2021-10-12T16:56:12+02:00

I review patches the following way.

1) I get the patch.. maybe from github

2) use csplit to have one diff file for every changed file

3) use vifm to slide through of these

4) this way of viewing stuff has no clear indication

of the end of the output. Eg

are there further lines after the last '}', I don't know

5) less has ~ characters showing lines after EOF

like this

6) I wanted something similar, but I wanted a cow telling me

that a file has no more content

cow saying eof

(replace patdiff below w/ cat in vifm config to get this)

7) flow specific, but I like my diffs filtered through patdiff

to do the hard work of highlighting actual difference by the char

https://opensource.janestreet.com/patdiff/

BEEE-cowsay-w-patdiff.png

Above screenshots were taken w/ below session:

$ curl --silent -H 'Accept: application/vnd.github.v3.diff' \

https://api.github.com/repos/ledger/ledger/pulls/2063 > patch

$ csplit -n 4 patch '/^diff/' '{*}' | paste -sd,

0,854,2815,2539,1243,309,838,7451,466,3469,287,381

$ opam install patdiff

[NOTE] Package patdiff is already installed (current version is v0.14.0).

$ which cowsay

/usr/bin/cowsay

$ grep \ xx ~/.config/vifm/vifmrc -A1

fileviewer xx*

\ patdiff <%f ; cowsay bye

$ vifm +only +split +view\! .