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

Fix color code in non-tty output #198

Closed yxnan closed 1 year ago

yxnan commented 1 year ago

check if the output is a tty, if not then don't emit shell color codes.

This is from issue https://github.com/p-e-w/shin/issues/3#issue-1423149106

MasterOdin commented 1 year ago

For this, is is that you want it to output the same as normal just sans color codes, or that you want it to print as the markdown source?

yxnan commented 1 year ago

I think just printing out the plain markdown is ok, the markdown notations will help the comprehension and it's also handy to insert the output to another markdown text.