Closed ksqsf closed 11 months ago
Thanks for your contribution and welcome to tldr, this PR is being superseded by #107. Feel free to check it out.
I see you merged some PRs on Aug 20, so presumably you also reviewed this PR. I'm genuinely curious which part of my patch is not so good, so bad that you decided to defer it until someone else picks #35 up?
I see you merged some PRs on Aug 20, so presumably you also reviewed this PR. I'm genuinely curious which part of my patch is not so good, so bad that you decided to defer it until someone else picks #35 up?
Hi, sorry for closing this PR, it isn't that your patch is bad (it is indeed excellent work). I didn't notice it when I was first notified (as I get a lot of notifications from other repos I have on watch), just noticed it when I made changes to the other PR, that's why I closed this one. I will add you as a coauthor over there.
Edit. The TLDR C client is currently undermaintained, we are looking for new maintainers to make it comply with the recent specifications. Some of the members from the Org like myself occasionally visit the repo upon notification from PRs/issues.
If you don't mind, can you share your commit mail? So that I can add you as a coauthor over there.
Done
What does it do?
Disable color display when the output is not a tty.
This change should not break the current workflow when tldr is used in terminals, but perhaps can break some CI runs (though unlikely), or perhaps someone's Emacs config that assumes color output. In that case, the users can pass
--color
to force color output to get the old behavior.Why the change?
For example, when I call in emacs
M-! RET tldr <cmd> RET
, the display is very unreadable.After the change:
See also #35.
How can this be tested?
tldr cmd > file
: no colortldr cmd
: has colortldr --color cmd > file
: has colortldr cmd | cat
: no colortldr --color cmd | cat
: has colorWhere to start code review?
getopt options, and
color_flag
Relevant tickets?
35
Questions?
It is unclear whether to pass
color_flag
toprint_localpage
. For now, I simply passed 1 to preserve compatibility.