title: How can I get case-insensitive completion with Term::ReadLine::Gnu?
body: <p>I can't seem to get case-insensitive completion when using <a href="http://search.cpan.org/perldoc?Term%3a%3aReadLine%3a%3aGnu" rel="nofollow">Term::ReadLine::Gnu</a>.  Take this example script:</p>
  
  <pre><code>use strict;
  use warnings;
  use 5.010;
  use Term::ReadLine;
  
  my $term = Term::ReadLine-&gt;new('test');
  say "Using " . $term-&gt;ReadLine;
  
  if (my $attr = $term-&gt;Attribs) {
    $term-&gt;ornaments(0);
    $attr-&gt;{basic_word_break_characters}     = ". \t\n";
    $attr-&gt;{completer_word_break_characters} = " \t\n";
    $attr-&gt;{completion_function} = \&amp;complete_word;
  } # end if attributes
  
  my @words = qw(apple approve Adam America UPPER UPPERCASE UNUSED);
  
  sub complete_word
  {
    my ($text, $line, $start) = @_;
    return grep(/^$text/i, @words);
  } # end complete_word
  
  while (1) {
    $_ = $term-&gt;readline(']');
    last unless /\S/;             # quit on empty input
  } # end while 1
  </code></pre>
  
  <p>Note that <code>complete_word</code> does case-insensitive matching.  If I run this with <a href="http://search.cpan.org/perldoc?Term%3a%3aReadLine%3a%3aPerl" rel="nofollow">Term::ReadLine::Perl</a> (by doing <code>PERL_RL=Perl perl script.pl</code>) it works as I expect.  Typing <code>a&lt;TAB&gt;&lt;TAB&gt;</code> lists all 4 words.  Typing <code>u&lt;TAB&gt;&lt;TAB&gt;</code> converts <code>u</code> to <code>U</code> and lists 3 words.</p>
  
  <p>When I use <a href="http://search.cpan.org/perldoc?Term%3a%3aReadLine%3a%3aGnu" rel="nofollow">Term::ReadLine::Gnu</a> instead (<code>PERL_RL=Gnu perl script.pl</code> or just <code>perl script.pl</code>), it only does case-sensitive completion.  Typing <code>a&lt;TAB&gt;</code> gives <code>app</code>.  Typing <code>u&lt;TAB&gt;&lt;TAB&gt;</code> doesn't list any completions.</p>
  
  <p>I even have <code>set completion-ignore-case on</code> in my <code>/etc/inputrc</code>, but it still doesn't work here.  (It works fine in <code>bash</code>, though.)</p>
  
  <p>Is there any way to get <a href="http://search.cpan.org/perldoc?Term%3a%3aReadLine%3a%3aGnu" rel="nofollow">Term::ReadLine::Gnu</a> to do case-insensitive completion?</p>