bug-bash
[Top][All Lists]
Advanced

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

Re: COMP_POINT is not set correctly when there is non-ascii characters i


From: Chet Ramey
Subject: Re: COMP_POINT is not set correctly when there is non-ascii characters in the command line.
Date: Wed, 28 Mar 2012 22:48:59 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

On 3/27/12 2:17 PM, Yichao Yu wrote:
> So is it possible to set COMP_POINT as the number of characters
> between 0 and rl_point (if it is also bad to break libreadline api by
> setting rl_point as that.) without screwing up other part of the code?
> (I hope this fix would be no more than searching for rl_point and
> replace wherever necessary.)

I was going to respond that to break the relationship between COMP_POINT
and rl_point makes it very difficult, if not impossible, to identify the
character under the cursor when completion is attempted, but I'm not
sure how much that actually matters.  You can't assign rl_point using
this, so that's not an issue either.

Pretty much everything else in bash uses characters, which may be bytes
depending on the locale.

Can someone who's more familiar with the bash completion package tell me
whether or not it uses COMP_POINT at all?  That's about that only thing
I can think of that would use it.

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]