darrenburns / dunk

Prettier git diffs in the terminal 🎨
726 stars 15 forks source link

`lazygit` usage? #22

Open plutonium-239 opened 1 month ago

plutonium-239 commented 1 month ago

Hi, can I use dunk with lazygit? It supports having custom pagers such as delta, diff-so-fancy that accomplish a similar goal to dunk - enhance diffs.

I tried setting the pager command (refer to the instructions for custom pager I linked) to both dunk and git diff | dunk. With dunk, the output was empty (i.e. dunk was running but received no input). So I piped git diff into it, and then I did get an output but like so:

image

, which is visibly broken.

Is there an argument I can pass to dunk/other methods that will help solve this?

(dunk is running as expected outside of the lazygit window)

darrenburns commented 1 month ago

git diff | dunk | less -R perhaps?

plutonium-239 commented 1 month ago

This just leaves me with image

probably because the $TERM is dumb. But, delta also uses less -R as it's pager, how does it get past that?

plutonium-239 commented 3 weeks ago

@darrenburns do you have any ideas on how to make this work?

darrenburns commented 3 weeks ago

I don't use lazygit... but the documentation says less doesn't work. Does this section help? https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md#using-external-diff-commands