bug-bash
[Top][All Lists]
Advanced

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

Re: using perl's gnu-readline interface, howto 'completion' & 'filter hi


From: Chet Ramey
Subject: Re: using perl's gnu-readline interface, howto 'completion' & 'filter history'?
Date: Fri, 09 Jan 2015 21:23:56 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 1/9/15 5:19 PM, Linda Walsh wrote:
> 
> 
> Andreas Schwab wrote:
>>
>> The default completion function is filename completion.  If you want
>> something different you need to write your own.
> ---
>     Yes... so I look for a 'complete' function that I
> can call with my options (or to choose some set of supplied
> choices, like usernames or hostnames) -- but minimally, the
> readline call I would use to set the options I want returned.
> 
>     But... I don't see a complete call in readline.

You might want to look at the description of the hook functions in
the `Completion Variables' section of the readline manual.  Readline
does filename completion internally, and nothing else; everything
else is performed by a calling application.

You could also look at the code in bashline.c to see how bash does it.

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