bug-bash
[Top][All Lists]
Advanced

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

Re: Strange compgen behaviour


From: Chet Ramey
Subject: Re: Strange compgen behaviour
Date: Thu, 24 Sep 2009 11:07:54 -0400
User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812)

Bernd Eggink wrote:
> Chet Ramey schrieb:
>>> Hm, compgen appears to behave strange if words contain whitespace. 
>>
>> Well, it splits the argument to -W on $IFS as documented.  What other
>> strange behavior do you see? 
> 
> For example, this:
> 
>     function _aha
>     {
>         local list="a b:c d:e f"
>         COMPREPLY=($(IFS=: compgen -W "$list"))
>     }
> 
>     complete -F _aha aha
> 
> Typing aha <Tab> cycles through 6 items a, b, c, d, e, f, whereas I
> would expect 3 items 'a b', 'c d', 'e f'. It looks like compgen splits
> the argument to -W on $IFS _and_ whitespace. Or am I missing something?

Hmmm...let me take a look.

-- 
``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]