bug-bash
[Top][All Lists]
Advanced

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

Re: Syntax coloring/highlighting in gnu-readline


From: Chet Ramey
Subject: Re: Syntax coloring/highlighting in gnu-readline
Date: Mon, 03 Mar 2014 09:06:57 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

On 3/2/14 7:16 PM, Solros wrote:
> On Friday, February 10, 2012 4:25:22 PM UTC+1, LanX wrote:
>>
>> I'm trying to interactively add colors while typing in readline and
>>
>> using rl_event_hook to change rl_line_buffer seems to work.
>>
>>
>>
>> Alas the ANSI escape codes for formatting which are allowed in the
>>
>> prompt are not interpreted and shown as they are.
> 
> I wonder did you manage solve this by now? I want to do the exact same thing 
> and would greatly appreciate any hints.

I have not done any work in this area, and have no immediate plans to.  The
readline internals do not lend themselves to this very well: the line
buffer management and display engines assume that every character in the
line buffer contributes to the screen display and should be displayed.  You
would need an auxiliary data structure to save and manipulate this
information.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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