I was wondering if this is the wrong list for this. Or is the description too vague?
Any help is appreciated.
Manish <com> wrote:
I'm new to perl and I'm trying to write a simple
program that will take commands from user. I would
like to provide command completion.
Currently I have:
$mainTerm = Term::ReadLine->new("Top Level");
$OUT = $mainTerm->OUT || *STDOUT;
# read command from user
$cmd = $mainTerm->readline ('client> ');
I see that it already provides history which is cool!
Let's say I have the following commands available at
this level - help, exit, do-one, do-two. How do I add
this to the program so that when use types h it
completes help and when user doesn't type anything and
hits or it shows the possible
completions. Any response is appreciated :)
Also, can I modify it so that it will take these
commands from a file or the stdin. I can have an
option in commandline for reading from file (say, -f
). I know how to do the commandline arguments,
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.
To unsubscribe, e-mail: org
For additional commands, e-mail: org
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around