Skip to content
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

lolcat doesn't seem to play nice with '\b' (backspace) or "\33[2K\r" (clear console line) #110

Open
n-ham opened this issue Apr 14, 2020 · 3 comments

Comments

@n-ham
Copy link

n-ham commented Apr 14, 2020

The '\b' character is often used for backspace and "\33[2K\r" is used to clear the console line on unix machines. Neither of which lolcat seems to play nicely with. It would be awesome if you were able to update lolcat so it does..

@tbooth
Copy link

tbooth commented May 13, 2020

Yeah I was hoping to make all my manpages look nice with something like:

$export MANPAGER='bash -c "lolcat -f \"\$@\" | less -R" PAGER'

But I just start seeing all the ^H control codes. Meh.

@busyloop busyloop deleted a comment from n-ham May 13, 2020
@m-o-e
Copy link
Member

m-o-e commented Jun 6, 2020

@n-ham @tbooth
lolcat tries to deal with control sequences to a degree
but it's tricky and it doesn't always succeed.

This may be improved in the future (PRs always welcome 😬).

In most cases you can help it a little by stripping the
problematic sequences before feeding the input to lolcat.

For man-pages you can use this:

export MANPAGER='bash -c "col -bx | lolcat -f \"\$@\" | less -R" PAGER'

@alexmyczko
Copy link

alexmyczko commented Jul 29, 2020

HERE BE DRAGONS. another trick is bash | lolcat (NO WARRANTIES) (OR $SHELL)
that works ok good with mc, ncdu, but not so much with modplug123, nor ocp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants