http://www.perlmonks.org?node_id=1073237


in reply to term::readline::gnu extra spaces on completion

Are you sure you are actually running Term::Readline::Gnu? Unless $ENV{PERL_RL} specifies ortherwise, Term::ReadLine indeed tries to use Term::ReadLine::Gnu first, then the EditLine version if it failed, then the Perl version, and at last if all else failed, defaults to Term::ReadLine::Stub where Attribs is defined as : sub Attribs { {} }

Try printing @Term::ReadLine::ISA or the output of Term::ReadLine::Readline() to see which version you are actually using.

Replies are listed 'Best First'.
Re^2: term::readline::gnu extra spaces on completion
by daverowntree (Initiate) on Feb 04, 2014 at 09:34 UTC
    Thanks for you suggestions:
    use Term::ReadLine; my $pkg = Term::ReadLine->ReadLine(); print "Term::ReadLine->ReadLine() says \'$pkg\'\n"; my $pkg2 = $ENV{PERL_RL}; print "ENV(PERL_RL) says \'$pkg2\'\n"; print "\@Term::ReadLine::ISA says ", @Term::ReadLine::ISA, "\n";
    gives:

    $ perl ../Tools/term_check.pl
    Term::ReadLine->ReadLine() says 'Term::ReadLine::Gnu'
    ENV(PERL_RL) says ''
    @Term::ReadLine::ISA says Term::ReadLine::GnuTerm::ReadLine::Stub

    So, as far as I can tell, I am running the Gnu version.

      Hmm ... You could check the version of your GRL, it has to be higher than 4.3 for rl_completion_suppress_append to work.

      I don't have any more ideas after that I'm afraid.

        According to the cygwin installer, I'm using readline7. So it /should/ work. I also checked the installed dlls and indeed it is version7.