tldr-pages / tldr-python-client

Python command-line client for tldr pages
https://pypi.org/project/tldr/
MIT License
596 stars 93 forks source link

Colors when piping output to less. #199

Open GasparVardanyan opened 1 year ago

GasparVardanyan commented 1 year ago

First of all thank you for this cool project.

When I pipe output to less, I lose colors. I do something like:

tldr ls | less -ru~ +g

and get one-color (my terminal's fg) output.

less -ru~ +g is capable to draw colored/bold/etc texts.

For example, ls (exa) have an option --color=always and when I pipe it's output to less, I get the same colored output.

Please add an ability to have colors in less.

I use tldr 3.1.0-2.