Does anyone here have some in-depth knowledge of Term::ReadLine::Gnu? For the most part, it works, but when I get into more complicated behavior tuning I have nowhere to turn. The documentation is pretty shoddy, not very verbose with descriptions.

Basically everything is working fine, except for fact that when I have several selections to choose from that all begin with the same word, the tab-completion just doesn't seem to work right. For example:

Let's say the valid tab-completion options are:

Foo Bar 001
Foo Bar 002
Foo Bar Biz Baz
Foo Bar 004

When I am at the readline prompt and hit tab, immediately the word "Foo Bar " comes up. Ok, thats fine since all my options start with "Foo Bar", however, then I hit tab again and another "Foo Bar " is added. And so on everytime I hit tab "Foo Bar " is added.

The correct behavior (i.e. the bash behavior) would be to put "Foo Bar " on the prompt after the first tab, but then with subsequent ones, list the options again. If I added a 0 to it: "Foo Bar 0"<tab> that would just display entries 1,2 and 4. And so on.

Right now I can't get that behavior. So really, the tab-completion doesn't complete at all, if I keep hitting tab it'll just fill the prompt with "Foo Bar" over and over.

How can I get this to behave exactly (or closer) to the bash prompt behavior?

Thanks for any help.

- Nick

In reply to tab-completion problems by nick

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.