bug-bash
[Top][All Lists]
Advanced

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

Re: Unicode collation for readline completion in bash


From: Chet Ramey
Subject: Re: Unicode collation for readline completion in bash
Date: Fri, 22 Jun 2012 09:25:52 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20120601 Thunderbird/13.0

On 6/20/12 7:27 AM, Rob Hoelz wrote:

> So, I have a number of files with diacritics in the name, like this:
> 
> $ ls
> Sigur Rós - Dauðalogn.ogg Sigur Rós - Ég Anda.ogg Sigur Rós -
> Rembihnútur.ogg Sigur Rós - Varúð.ogg
> Sigur Rós - Ekki Múkk.ogg Sigur Rós - Fjögur Píanó.ogg Sigur Rós -
> Valtari.ogg Sigur Rós - Varðeldur.ogg
> 
> I'd like diacritics to be ignored when performing tab completion, so if
> I type "Sigur Ros - Eg" and hit tab, "Sigur Rós - Ég Anda.ogg" is filled in.
> 
> I've done some research, and it seems that this feature has yet to be
> implemented. Does anyone know of an implementation for this, and if not,
> would
> this be acceptable as an addition to bash, or better yet, GNU readline?

I would be willing to take a look at such an addition to readline, but I
have no plans to do it myself.

You should be able to get a long way by simply using strcoll(3) to perform
string comparison when comparing filenames against what the user typed,
but that interface is pretty limited, and it's not clear how you would
accommodate case-insensitive or case-mapping comparisons.

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]