Hacker News new | past | comments | ask | show | jobs | submit login

I discovered that you can have git use the pager you like so I set it to my darling : bat

    git config --global core.pager bat
https://github.com/sharkdp/bat/





You can also do that with delta (https://github.com/dandavison/delta), with additional options that you can put on your .gitconfig

Is there an advantage to doing this over setting the GIT_PAGER environment variable?

(Weirdly, git doesn't seem to honour the PAGER var (which would be even better), although its man page claims it does)


I never used that env variable, but, an advantage is that you can put all your git configs in one file and reuse it across different machines, just like any dotfile.

If you use --local instead of --global, you can configure just for the current repository, useful if may find that delta is or isn't the best choice just for that repository


Less env pollution.

It just makes everything perfect.



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: