Closed t184256 closed 10 months ago
The color should be disabled automatically when the output is not terminal, for example, the color becomes annoying in the following uses:
tldr ls | less
tldr ls > ls.md
Some programs, such as ls
and grep
, provides --color=auto|never|always
.
Yes. And I want such an option for tldr
.
For anyone needing a quick and annoying method, change the ANSI codes being used here (and onwards)
https://github.com/tldr-pages/tldr-c-client/blob/be56821515b6d35e6bd25845108a23215c0d447e/src/tldr.h#L44 to other ANSI codes such as \033[37m
to make it white for example
Don't forget to recompile
We could just make read whether there is other defined ANSI codes, if not just default to these ones.
Please add an option to disable color highlighting (or specify a configurable colorscheme).