[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] colorized/highlighted scan output?

From: David Levine
Subject: Re: [Nmh-workers] colorized/highlighted scan output?
Date: Fri, 02 Nov 2012 12:53:36 -0500

Ken wrote:

> - Can we just stick with the original idea of outputting escape characters?
>   Well ... maybe.  The problem is the limitation of the format language.
>   For example, you can't have an argument to a function which contains
>   a ')' character.  Maybe that isn't a concern.  We might need two new
>   format functions, ones that turn "zero width" mode on and off (and
>   thus two new format instructions).

While terminfo or something higher level, more generic,
etc., would be nice, we're so close now to supporting ANSI
escapes that I'd like to (and am going to :-) get them to
work.  It doesn't preclude adding something else, of course.

Here's a nasty way to feed a ')' to a format literal:

    1) in profile:
    closeparen: )

    2) in format:
    %(void(profile closeparen))%(zputlit)

Fortunately, I don't expect to need that.  I just tripped
over it before I realized that I could just put an ASCII ESC
directly in a format.  But, it might suggest adding support for
something like this:

    %(display cyan)%(zputlit)

There could be a set of predefined values for common ANSI
escapes.  Users could override each value or supply anything
else they wanted in their profile.  (Or some additional file
that gets appended to the profile.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]