This queue is for tickets about the Term-ReadLine-Gnu CPAN distribution.
Maintainer(s)' notes
When you report a bug, please provide the following information;
- output of
perl -V
perl Makefile.PL verbose
make test TEST_VERBOSE=1
perl -Mblib t/00checkver.t
echo $TERM
- terminal emulator which you are using
- compiler which is used to compile the GNU Readline Library (libreadline.a) if you can know.
Read
INSTALL in the distribution for more details.
Owner: |
HAYASHI [...] cpan.org
|
Requestors: |
cjm [...] cpan.org
|
Cc: |
|
AdminCc: |
|
|
Severity: |
Important |
Broken in: |
1.20 |
Fixed in: |
1.27 |
|
Fri Nov 11 21:22:55 2011
cjm [...] cpan.org - Ticket created
I asked in
http://stackoverflow.com/q/8070012/8355 why I couldn't get
Term::ReadLine::Gnu to do case-insensitive completion. It turns out
that Term::ReadLine::Gnu::XS::_trp_completion_function is performing a
case-sensitive filter on the results. I'm not sure why.
The attached patch fixes this issue and makes Term::ReadLine::Gnu behave
like Term::ReadLine::Perl. The test script on StackOverflow may be
useful in confirming that.
--- Term/ReadLine/Gnu/XS.pm$ 2011-11-09 12:06:33.077031863 -0600
+++ Term/ReadLine/Gnu/XS.pm 2011-11-11 19:59:21.008707489 -0600
@@ -579,10 +579,7 @@
return undef unless defined $_matches[0];
}
- for (; $_i <= $#_matches; $_i++) {
- return $_matches[$_i] if ($_matches[$_i] =~ /^\Q$text/);
- }
- return undef;
+ return $_matches[$_i];
}
1;
Sat Nov 12 08:08:45 2011
HAYASHI [...] cpan.org - Taken
Sat Nov 12 08:12:24 2011
The RT System itself - Status changed from 'new' to 'open'
Sat Mar 01 19:54:31 2014
HAYASHI [...] cpan.org - Correspondence added
I put your fix in 1.21.
Thanks.
Sat Mar 01 19:54:32 2014
HAYASHI [...] cpan.org - Status changed from 'open' to 'resolved'
Sat Mar 01 19:54:33 2014
HAYASHI [...] cpan.org - Fixed in 1.21 added
Wed Feb 04 10:16:35 2015
HAYASHI [...] cpan.org - Correspondence added
I've found that the fix contributed was wrong. Here is the correct fix.
@@ -580,7 +584,10 @@
}
for (; $_i <= $#_matches; $_i++) {
- return $_matches[$_i] if ($_matches[$_i] =~ /^\Q$text/);
+ # case insensitive match to be compatible with
+ # Term::ReadLine::Perl.
+ #
https://rt.cpan.org/Ticket/Display.html?id=72378
+ return $_matches[$_i] if ($_matches[$_i] =~ /^\Q$text/i);
}
return undef;
}
It will be included in the next release.
Wed Feb 04 10:16:41 2015
HAYASHI [...] cpan.org - Status changed from 'resolved' to 'patched'
Sun Sep 06 05:22:47 2015
HAYASHI [...] cpan.org - Correspondence added
Sun Sep 06 05:22:49 2015
HAYASHI [...] cpan.org - Status changed from 'patched' to 'resolved'
Sun Sep 06 05:22:50 2015
HAYASHI [...] cpan.org - Fixed in 1.27 added