🐛 delta doesn't page in Windows Terminal
Discussed in https://github.com/dandavison/delta/discussions/1387
I'm getting the something similar to https://github.com/dandavison/delta/discussions/1387 on Windows 11/Powershell, even after using winget install -e jftuga.less.
But only with the common git lg alias: https://gist.github.com/johanmeiring/3002458
Repro:
- winget install -e jftuga.less
- winget install -e dandavison.delta
- git config --global core.pager delta
- git config --global interactive.diffFilter "delta --color-only"
- git config --global delta.navigate true
- git config --global merge.conflictStyle zdiff3
- restart shell, just in case
- git log --color --graph --abbrev-commit --oneline (works as expected)
- git lg (prints entire repo, no paging)
So it seems broken with --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
Actually - this appears to be more related to the terminal itself?
Doing git lg in the vscode terminal window works totally fine - but using either command in Windows Terminal is printing the whole log!
My bad - I was testing this on two different terminals and thinking it would be identical due to them both using Powershell.
Therfore... Delta doesn't work with Windows Terminal?
Hi @vikhik, I'm guessing the problem is that in your Windows Terminal, delta is not finding an executable named "less"? You could investigate by using delta's --pager flag to specify an absolute path to less (all delta flags can be set in git config also, so that would be something like git config --global delta.pager AbsolutePathToLess.
So, for what it's worth, less does correctly run:
I checked where less.exe is, and ran git config --global delta.pager "C:\Program Files\Git\usr\bin\less.exe" - but I still have the same issue.