Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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
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
Node Status?
node history
Node Type: note [id://940134]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2014-10-26 03:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (150 votes), past polls