Add environment variable BAT_PAGING#2641
Conversation
|
Thank you for the PR! I'm tempted to approve this because of how straightforward and symmetrical it is. But I don't quite understand what is wrong with the existing method to disable that pager with an env var: |
|
I think setting In addition, it is currently not possible to set Also, |
|
Makes sense! Would be great if you could a simple regression test for this change. A test that runs with BAT_BAGER set but uses BAT_PAGING=never to disable it. The regression test should fail without the fix. Thanks! |
|
I have just come across this:
Should |
|
You'll want to add a test to https://github.com/sharkdp/bat/blob/master/tests/integration_tests.rs, search for BAT_PAGER in that file |
Unfortunately, that test doesn't fail without the fix applied because the tests don't run bat on an interactive terminal, which means the default is no paging, so setting BAT_PAGING=never wouldn't change anything. So instead the test I wrote sets BAT_PAGING=always to make sure BAT_PAGING actually has an effect. |
|
Thank you for the effort. Let's merge. |
Fixes #2629