Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

--nocolor implies --noheaders #67

Closed
Rogier-5 opened this issue Jan 18, 2014 · 3 comments
Closed

--nocolor implies --noheaders #67

Rogier-5 opened this issue Jan 18, 2014 · 3 comments
Labels
Milestone

Comments

@Rogier-5
Copy link

Hi,

I just learnt about and installed dstat, and it promises to be a permanent addition to my toolset. Thanks.

While experimenting, I noticed that the option --nocolor also enables --noheaders. However, while I prefer not having any colors, I still want to run it in a terminal, and so, not having a line of headers on the screen after dstat has been running for some time is quite inconvenient.

Could you consider separating these two, so that a colorless display with headers is still possible ?

@dagwieers
Copy link
Collaborator

Agreed. The rationale was that either you had a terminal that was capable of colors, escape controls (updates) and rows/columns (headers) information, or you didn't. And the --nocolor option is assuming that if you haven't got colors, you wouldn't have all the other functionality :-)

But I was completely ignoring that maybe someone would simply hate to have colors. And now that I think of it, I have not thought about color-blindness either...

If I would implement it, you would also be getting intermediate updates. Is that correct ?

@Rogier-5
Copy link
Author

Rogier-5 commented Feb 5, 2014

Agreed. The rationale was that either you had a terminal that was capable of colors, escape controls (updates) and rows/columns (headers) information, or you didn't. And the --nocolor option is assuming that if you haven't got colors, you wouldn't have all the other functionality :-)

So in fact, the --nocolor option disables interactive display mode instead of just disabling colors ?

If I would implement it, you would also be getting intermediate updates. Is that correct ?

I would expect --nocolor to eliminate the colors, but not change the output in any other way. So, it would leave intermediate updates enabled. Is that what you mean ?

BTW, an alternative would be to add a '--headers' option to re-enable repetitive headers. The added benefit, is the the output of dstat can then be piped through a postprocessing stage, and modified (e.g. by computing a derived statistic) before it is printed on-screen.

@dagwieers
Copy link
Collaborator

What you expect makes total sense in hindsight, so I need to fix it. So rather than a feature, this is a bug. Let's retag :-)

If you pipe output from dstat, we don't have a terminal and so colors, intermediate updates and headers are disabled by default in this case. The problem is that --nocolor implies the same, which is incorrect.

@dagwieers dagwieers added bug and removed feature labels Feb 5, 2014
@dagwieers dagwieers added this to the 0.7.3 milestone May 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants