Dag Wieers said:
> On Fri, 18 Mar 2005, Charles Lepple wrote:
>> Also, I'm not exactly sure about the op.nolimit and op.update options,
>> but it seems like those should be conditional on the "not
>> sys.stdout.isatty()" test, and if stdout is a terminal, then op.color
>> should be set. That way, even if I am on a non-color-capable terminal,
>> the headers will get redisplayed once per screenful of stats.
>
> This was actually for people who were piping the output to a file. In that
> case you don't want colors or any of the ansi/vt100 crap :) But there's a
> lot of potential improvements in this area.

Understood. I think it's a neat idea, it just looks like it got broken
when the ncurses stuff was removed.

How's the attached patch for starters?

>> I realize that adding all color-capable terminals to the list would be a
>> big maintenance headache, but it would be nice if any terminal ending in
>> "-color" turned on op.color. Or, there could be a --color option to
>> complement --nocolor.
>
> I'd love to use ncurses for what it was designed, sadly if I try to use
> ncurses it clears the complete screen or does something ugly inside a
> screen.

I tend to avoid ncurses whenever possible, sorry :-)

I'm feeling lazy, so I didn't even attempt to do matching for terminal
names ending in '-color', but 'xterm-color' is common enough.

-- 
Charles Lepple

Attachment: dstat-color.patch
Description: Binary data

Reply via email to