[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Re: colored diffs [Was: [PATCH] parent selector 'p:
From: |
Ethan Blanton |
Subject: |
Re: [Monotone-devel] Re: colored diffs [Was: [PATCH] parent selector 'p:xxx'] |
Date: |
Mon, 8 Oct 2007 21:52:17 -0400 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Zack Weinberg spake unto us the following wisdom:
> On 10/8/07, Ethan Blanton <address@hidden> wrote:
> > > It's a good idea but you need to be careful how you implement it.
> > > Hardwiring VT220 color control codes would be bad. So would making us
> > > depend on ncurses.
> >
> > ncurses is far less odious than boost -- most systems actually *have*
> > ncurses, and it doesn't kick compilation times into the stratosphere,
> > either. ;-)
>
> Well, probably it wouldn't be much trouble, but I must point out that
> GNU ls manages to have optional colorized output without depending on
> ncurses (however, I have no idea how that feature works).
GNU ls hardwires VT220 color codes, and there is a list of acceptable
TERM names for which it is used. I think it consults COLORTERM as
well, but I'm not sure -- I'd have to check the documentation.
> > > I'd suggest a set of Lua hooks that know the necessary escape
> > > sequences for the most common TERM= settings (xterm, etc) and can
> > > query the 'tput' utility for less common ones. You could also use
> > > this to get at the line-drawing characters for
> > > asciik...
> >
> > Down this path lies madness. You're reinventing terminfo.
>
> Not so - it's just a more arms-length version of the code we would
> write if we used ncurses directly.
The tput part is -- which is slow, but correct. The other part is the
reinventing terminfo bit. ;-) It also makes the assumption that
TERM=foo means the same thing in every location, which it may or may
not.
I guess I really don't see ncurses as a problem, but maybe I'm too
old-fashioned. ;-)
Ethan
--
The laws that forbid the carrying of arms are laws [that have no remedy
for evils]. They disarm only those who are neither inclined nor
determined to commit crimes.
-- Cesare Beccaria, "On Crimes and Punishments", 1764
signature.asc
Description: Digital signature
- Re: [Monotone-devel] Re: [PATCH] parent selector 'p:xxx', (continued)
- Re: [Monotone-devel] Re: [PATCH] parent selector 'p:xxx', Ethan Blanton, 2007/10/08
- [Monotone-devel] colored diffs [Was: [PATCH] parent selector 'p:xxx'], Lapo Luchini, 2007/10/08
- [Monotone-devel] Re: colored diffs [Was: [PATCH] parent selector 'p:xxx'], Lapo Luchini, 2007/10/08
- Re: [Monotone-devel] Re: colored diffs [Was: [PATCH] parent selector 'p:xxx'], Julio M. Merino Vidal, 2007/10/08
- Re: [Monotone-devel] Re: colored diffs [Was: [PATCH] parent selector 'p:xxx'], Ralf S. Engelschall, 2007/10/08
- Re: [Monotone-devel] Re: colored diffs [Was: [PATCH] parent selector 'p:xxx'], Julio M. Merino Vidal, 2007/10/08
- Re: [Monotone-devel] Re: colored diffs [Was: [PATCH] parent selector 'p:xxx'], Ralf S. Engelschall, 2007/10/08
- Re: [Monotone-devel] Re: colored diffs [Was: [PATCH] parent selector 'p:xxx'], Zack Weinberg, 2007/10/08
- Re: [Monotone-devel] Re: colored diffs [Was: [PATCH] parent selector 'p:xxx'], Ethan Blanton, 2007/10/08
- Re: [Monotone-devel] Re: colored diffs [Was: [PATCH] parent selector 'p:xxx'], Zack Weinberg, 2007/10/08
- Re: [Monotone-devel] Re: colored diffs [Was: [PATCH] parent selector 'p:xxx'],
Ethan Blanton <=
- Re: [Monotone-devel] Re: colored diffs [Was: [PATCH] parent selector 'p:xxx'], Nathaniel Smith, 2007/10/08
- Re: [Monotone-devel] Re: colored diffs [Was: [PATCH] parent selector 'p:xxx'], Zack Weinberg, 2007/10/08
- Re: [Monotone-devel] Re: colored diffs [Was: [PATCH] parent selector 'p:xxx'], Derek Scherger, 2007/10/09
- Re: [Monotone-devel] Re: colored diffs, Tero Koskinen, 2007/10/11
Re: [Monotone-devel] [PATCH] parent selector 'p:xxx', Ralf S. Engelschall, 2007/10/06
Re: [Monotone-devel] [PATCH] parent selector 'p:xxx', Ludovic Brenta, 2007/10/06
Re: [Monotone-devel] [PATCH] parent selector 'p:xxx', Ralf S. Engelschall, 2007/10/10