-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output differs (and is wrong) from cat on colored file from stark/Color-Scripts #771
Comments
👍
We always call the pager. The may then decide to exit early if the output fits on one screen. |
By the way: note that you can use |
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
The text was updated successfully, but these errors were encountered: