Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Using Tab Completion on Windows in cmd.exe

by Stamm (Acolyte)
on Nov 25, 2011 at 22:40 UTC ( #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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://940134]
[usemodperl]: perl is not broken, perl is being broken by the web being broken by https, for the love of banking apps on free wifi at coffee shops or something...
[Veltro]: Wondering, would it be so hard to write a small application that you can access using http which forwards the request over web ussing ssl?
[Veltro]: are there not even tools for that?
[usemodperl]: the breakage is so fresh i guess not, so it's up to us! :-)
[usemodperl]: someone has yet to make that future famous free http to https proxy written in perl and supported by ads, paypal, patreon, etc to make millions of dollars a minute!
[Veltro]: Why would this be fresh, I recon this is stuff that happens all the time (not Perl per se)
[Corion]: usemodperl: I'm sure you could even code that on the command line.
[usemodperl]: definitely

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2018-06-24 17:00 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.