bat-extras icon indicating copy to clipboard operation
bat-extras copied to clipboard

`batdiff` and `batgrep` don't page unless `--pager` is explicity set.

Open goodevilgenius opened this issue 4 years ago • 4 comments

If I run batdiff file1 file2, the entire diff is printed to the screen without paging.

If I run batdiff --paging=always file1 file2, the same thing happens.

If I run batdiff --pager='less -R' file1 file2, or batdiff --pager='bat -p' file1 file2, I get paging as I expect it to.

This is also true for any batgrep commands.

I have tried multiple terminal emulators, with the same results. I have also tried in both Fedora and Mint.

goodevilgenius avatar Apr 12 '21 15:04 goodevilgenius

Odd, it shouldn't be doing that. What do you have set for your PAGER and BAT_PAGER environment variables?

eth-p avatar Apr 12 '21 22:04 eth-p

@eth-p I don't have either set at all.

goodevilgenius avatar Apr 13 '21 11:04 goodevilgenius

@eth-p I don't have either set at all.

Thanks! It should now be fixed in 20cdf5a9983da09bdfe640bbd321f606a282e7db.

eth-p avatar Apr 13 '21 19:04 eth-p

Looks good to me now.

goodevilgenius avatar Apr 15 '21 18:04 goodevilgenius