Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Using Tab Completion on Windows in cmd.exe

by Stamm (Sexton)
on Nov 25, 2011 at 22:40 UTC ( [id://940134]=note: print w/replies, xml ) Need Help??


in reply to Using Tab Completion on Windows in cmd.exe

I noticed that, by default, the environment variable TERM is set to DUMB on Windows. If I unset it, tab completion works in all packages. It's actually Term::ReadLine::Perl who is called behind the scenes.

Unfortunately, I can't use arrow keys anymore to edit the line. I can only use Ctrl-B & Ctrl-F like in vi.

Is there a way to have the arrow key comfort? By looking at the source, I suspect it can be done with Keymaps in the Term::ReadLine::Perl package, but there's no documentation. Anybody knows how to do that?
  • Comment on Re: Using Tab Completion on Windows in cmd.exe

Replies are listed 'Best First'.
Re^2: Using Tab Completion on Windows in cmd.exe
by Anonymous Monk on Nov 26, 2011 at 05:40 UTC

    Hmm, unsetting term=dumb doesn't work for me on winxp, which windows do you have?

      I'm using Windows 7. I think you must have Term::ReadLine::Perl installed. Otherwise, Term::ReadLine::Stub will be used, which doesn't do word completion.

        Yeah, I got that, I have it

        $ perl -MTerm::ReadLine -MTerm::ReadLine::Perl -d:Modlist -e 1 Carp 1.23 Exporter 5.65 Term::ReadLine 1.07 Term::ReadLine::Perl 1.0303 warnings 1.12

        perl -d:Modlist -e "  use Term::Complete; $|=1; warn $input = Complete( q[ type or tab  ] , [ qw[ ro sham bo foo bar baz ] ] ); " doesn't work for me

        update: of course, it doesn't use Term::Readline, duh ...

        So, what are you using, and how (short example please)?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://940134]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2025-06-21 13:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.