On Tue, Sep 22, 2009 at 17:00, Harry Putnam <[email protected]> wrote: > I use several homemade scripts frequently that revolve around taking > input from user and writing to specified files. > > One thing I really miss while giving the input is some kind of > editor like environment, be it vi or emacs, either would be > great. I really miss completion too, as provide by bash. > > How big of a chore would it be to include code into the script that > creates some kind of editor like environment and allows bash style > completion? > > I'm a very low level perl coder.. and will need pointers to some clues > about how to get this done, and incorporated into my scripts. > > In shell scripting, at least with bash, taking input from user is done > with `read line' but you can say 'read -e line' and the input is > suddenly done with bash completion.. and I think a few other niceties. > > Is there something similar in perl? snip
Take a look at [Term::Readline][1], [Term::Readline::GNU][2], and [Term::Readline::Perl][3]. [1] : http://perldoc.perl.org/Term/ReadLine.html [2] : http://search.cpan.org/dist/Term-ReadLine-Gnu/Gnu.pm [3] : http://search.cpan.org/~ilyaz/Term-ReadLine-Perl-1.0302/ -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
