-
Notifications
You must be signed in to change notification settings - Fork 608
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
Empty line added when filtering to 'less -R' #157
Comments
Closed
fatih
added a commit
that referenced
this issue
Mar 12, 2023
The newline should be added after wrapping the input with escape sequences. That way `less` or other commands can parse the output correctly. fixes #157
fatih
added a commit
that referenced
this issue
Mar 12, 2023
The newline should be added after wrapping the input with escape sequences. That way `less` or other commands can parse the output correctly. fixes #157
Many thanks for sorting this out! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a minimal program to reproduce the issue (I am on Ubuntu Linux 20.04 and I use gnome-terminal):
When run, the above program displays foo in red. Good.
However, when the output is piped to less -FR, an empty line is added:
Please note that in the output above, foo on lines 2 and 4 is rendered in red on my screen. One can see that the raw line ESC[0m is added at the end, which is not the desired output, I think.
The desired output would be:
Thanks for looking at it.
The text was updated successfully, but these errors were encountered: