eth-p / bat-extras

Bash scripts that integrate bat with various command line tools.
MIT License
1.22k stars 82 forks source link

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

Open goodevilgenius opened 3 years ago

goodevilgenius commented 3 years ago

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.

eth-p commented 3 years ago

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

goodevilgenius commented 3 years ago

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

eth-p commented 3 years ago

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

Thanks! It should now be fixed in 20cdf5a9983da09bdfe640bbd321f606a282e7db.

goodevilgenius commented 3 years ago

Looks good to me now.