bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] Can't use terminal display escapes in completion list


From: Chet Ramey
Subject: Re: [Bug-readline] Can't use terminal display escapes in completion lists
Date: Wed, 23 Feb 2011 09:21:51 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

On 2/22/11 6:36 PM, Judson Lester wrote:
> I'm writing an app that uses readline, and was hoping to use display
> escapes (bold, colors, etc) in the completion list for readline.  I've
> found that readline seems to escape them, so they show up as junk in the
> output.  Is there a setting I'm missing or something?

There is currently no option to enable that behavior.  There are two cases
to consider: displaying possible completions, and inserting partial or
whole completions into the command line.  I'm not quite sure why you'd
want to have terminal escapes as part of the completion inserted into the
command line, since your application will have to deal with the results
and it will mess up readline's redisplay.

As for displaying possible completions, readline's basic assumption is
that it is displaying filenames, and the important thing is to make sure
all the characters in the name are displayed.

If you're willing to do it, you can write your own hook to display the
matches, and it can color possible matches any way you want.

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



reply via email to

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