Closed ericonr closed 4 years ago
After a bit more investigating I tried running it with the pager disabled:
bat --paging=never crowns
:+1:
even if there shouldn't have been a pager involved, because the output easily fit into the buffer.
We always call the pager. The may then decide to exit early if the output fits on one screen. bat
can not make that decision, as we want bat
to be unbuffered ( we want to print one output line for each input line).
By the way: note that you can use bat -pp …
to quickly disable the pager in case you experience problems with the pager in the future.
Ok, thanks!
I was taking a look at the colored terminal scripts from stark/Color-Scripts, and one of them was, instead of a script, a text file that had to be printed to STDOUT to be visualized. It was the crowns file. Using
cat
on it yields the correct result, but usingbat
yields a wrong result, both on Alacritty and Konsole, both withbash
andfish
, and with or without the-p
flag for plain output.The output from both commands can be seen in this asciinema.
EDIT:
bat
version: 0.12.1After a bit more investigating I tried running it with the pager disabled:
which actually fixed the issue, even if there shouldn't have been a pager involved, because the output easily fit into the buffer.
By changing the
PAGER
environment variable tomore
, I got even weirder output, so it seemsbat
calls a pager anyway (unless paging is set tonever
), possibly with some flags that make it not page unless the output is big enough to need it, which seems unnecessary to me.I will file a bug report with
less
andmore
developers, because both have weird output, even if they show the colors:or