Live data from Hacker News

Delta: A syntax-highlighting pager for Git, diff, grep, and blame output

github.com

1–10 of 98 posts

Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output

#6
post #4

I use both delta and difftastic (difft), and cannot recommend them enough. If you use the terminal at all, get them!

Difftastic and Delta work not only in bare terminals. Both are supported by Magit in Emacs, both are also supported by Lazygit.

Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output

#7
post #5

i knew git could use arbitrary diff filter but never realised it was this simple to use. This looks very nice. The related? project "bat" also looks interesting.

If you are getting to check out bat, you might want to check,

- rg (ripgrep): A grep replacement

- sk (skim): A grep/fzf/fzy replacement

- fd: A find replacement that's .gitignore+.ignore aware.

- eza: A replacement for ls that's git aware

- broot: A TUI file finder to browse large directories

- yazi: A file manager (I haven't used this one too much)

sk+rg + gawk in action to find files matching some text,

            sk \
              --ansi \
              --interactive \
              --cmd 'rg --color=always --line-number "{}"' --preview 'bat --color=always $(echo {} | gawk -F: "{print \$1}") --highlight-line $(echo {} | gawk -F: "{print \$2}")' \
            | gawk \
                -F: \
                '{print $1}'

Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output

#8
Delta has been one of those set and forget things, it's been a while since I've seen 'bare' git grep/diff/blame output, I also use it all the time for normal diffs (outside of git repos), but TIL that it also works with ripgrep [0]

As someone else already mentioned there is also bat[1], which was also set and forget, I aliased cat to bat and have a seperate alias vcat for 'vanilla cat' /usr/bin/cat

[0] https://dandavison.github.io/delta/grep.html

[1] https://github.com/sharkdp/bat

Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output

#9
post #7
post #5

i knew git could use arbitrary diff filter but never realised it was this simple to use. This looks very nice. The related? project "bat" also looks interesting.

If you are getting to check out bat, you might want to check, - rg (ripgrep): A grep replacement - sk (skim): A grep/fzf/fzy replacement - fd: A find replacement that's .gitignore+.ignore aware. - eza: A replacement for ls that's git aware - broot: A TUI file finder to browse large directories - yazi: A file manager (I haven't used this one too much) sk+rg + gawk in action to find files matching some text, sk \ --ans…

Love these, my only change is lsd over exa (pure personal preference)

Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output

#10
post #7
post #5

i knew git could use arbitrary diff filter but never realised it was this simple to use. This looks very nice. The related? project "bat" also looks interesting.

If you are getting to check out bat, you might want to check, - rg (ripgrep): A grep replacement - sk (skim): A grep/fzf/fzy replacement - fd: A find replacement that's .gitignore+.ignore aware. - eza: A replacement for ls that's git aware - broot: A TUI file finder to browse large directories - yazi: A file manager (I haven't used this one too much) sk+rg + gawk in action to find files matching some text, sk \ --ans…

I love broot, I use it for everything.

I also use foot+fzy as a tiny sway dmenu replacement.. I started to make other kinds of custom tiny TUI popup menus using this strategy and it's great, since it all uses my terminal style and each is an extremely tiny 1 or 2 line script.

Post reply on HN