Bat: Bat quickly exits

Created on 14 Nov 2018  路  4Comments  路  Source: sharkdp/bat

This happens to me for some files (so far, I've seen it happen for JS / TS / JSON files):

screen recording 2018-11-14 at 14 54 45

It still works for some files, e.g., README.md and yarn.lock.

I can't see a pattern yet, is there any debug info I could send? I'm on 0.9.0 and macOS Mojave.

question

Most helpful comment

Thanks for the hints, I've updated to less version 530 and set $BAT_PAGER to less -R which is the behavior I prefer. bat awesomeness is back!

All 4 comments

This is probably caused by the pager. What is the value of the PAGER (and BAT_PAGER) environment variables? Can you try with --paging=never? Or try to set BAT_PAGER="less"?

Thanks, the output is:

$ echo $PAGER
less

$ echo $BAT_PAGER
less -RF

I've specifically set BAT_PAGER previously, can't quite remember why but plain less was not enough. Has something about this changed in 0.9.0?

We have added "Support pager command-line arguments in PAGER and BAT_PAGER" in 0.8.0 (see #352). If you have set up BAT_PAGER="less -RF" pre-0.8, it was probably just ignored. Now it will actually start less -RF which does not work if you have an old version of less (you also need -X).

Thanks for the hints, I've updated to less version 530 and set $BAT_PAGER to less -R which is the behavior I prefer. bat awesomeness is back!

Was this page helpful?
0 / 5 - 0 ratings