[PATCH] color: use ui.formatted() to test TTYness, not sys.stdout.isatty()

Matt Mackall mpm at selenic.com
Tue May 3 10:27:17 CDT 2011


On Tue, 2011-05-03 at 10:41 +0200, Martin Geisler wrote:
> Christian Ebert <blacktrash at gmx.net> writes:
> 
> > * Christian Ebert on Sunday, May 01, 2011 at 13:25:25 +0100
> >> * Brodie Rao on Sunday, May 01, 2011 at 14:04:06 +0200
> >>> On May 1, 2011, at 1:28 PM, Christian Ebert wrote:
> >>> 
> >> xterm 270 (latest) seems to work now. But not within screen and
> >> TERM=screen-256color (latest screen).
> >> 
> >> Terminal.app with Apple-shipped ncurses also displays control
> >> chars (MacOS 10.5.8).
> >
> > Played around some more. Seems it depends on the value of $TERM. Here
> > are the results for the $TERM values I mostly use:
> >
> > xterm-256color: ok
> > screen-256color: control chars
> > nsterm-16color: control chars
> 
> I'm also seeing control chars in my Eterm with TERM set to both 'Eterm'
> and 'Eterm-color'.

I'm guessing this discussion is really about Danek's earlier change to
consult termcap rather than assume ANSI-style escape sequences, and not
Augie's change to properly check isatty() at startup. cc:ing Danek.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list