-
Notifications
You must be signed in to change notification settings - Fork 84
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 #41
Comments
The problem with the crowns file is it contains cursor-movement commands. There are numerous instances in the file of "ESC [ nn C" sequences to move the cursor right. This will behave differently on different terminals. It might work if you use -r but that's not recommended due to the potential for display problems if the embedded cursor movements interfere with less's management of the screen. |
Yeah, it did work with That said, should I close the issue? |
less
version: 551 (PCRE regular expressions)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. When shown using
less --RAW-CONTROL-CHARS crowns
it shows a different (wrong) result than when simply printing it to the terminal (using
cat
).The output from both commands (
cat
andless
throughbat
) can be seen in this asciinema.I have verified the same behavior in both Konsole and Alacritty, and have guaranteed that my terminal was wide enough for the file to be printed on it.
I first realized this problem in this issue with
bat
.The text was updated successfully, but these errors were encountered: