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 c...@case.edu http://cnswww.cns.cwru.edu/~chet/