Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Active STDIN for user typed filepath

by furry_marmot (Pilgrim)
on Mar 30, 2012 at 06:11 UTC ( #962537=note: print w/ replies, xml ) Need Help??


in reply to Active STDIN for user typed filepath

Works fine for me. It's not in Perl, it's in the shell. I've been doing this with Windows since Win95. Edit your registry and add the following:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor] "CompletionChar"=dword:00000009 "EnableExtensions"=dword:00000001 "PathCompletionChar"=dword:00000009

CompletionChar refers to a file. PathCompletionChar refers to a path (duh...). 9 is the ASCII code for <tab>. Change as you like. Enabling Extensions gives you some additional shell functionality. It is limited compared to bash, etc., but the shell can be made to be bearable.

You can save that block of text to a file with a .reg extension and just run it. If you have admin rights on your box, it will update the registry. Then run this and see if it works.

perl -e "$x = <STDIN>; print $x"

Press tab at the command prompt and it will cycle through files and paths.

--marmot


Comment on Re: Active STDIN for user typed filepath
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-12-22 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (133 votes), past polls