Looking for Cli like with auto-completion of options

I want to write some basic cisco like Cli.
have seen “highline” which is very nice but i want some auto-completion
and data validation on auto-completion.
i dont want a command line arguments … but like irb.
i have couple types of data such as IP addresses commands subcommands
and options in the command.
i have seen highlight and irb/completion.rb.
i’m sure someone wrote some nice library just for this kind of stuff.
most of the examples that i have seen are nice but dont give me what i
really need.

i know that it’s suppose to be an endless loop,
a “tab tab” should auto complete,
a “?” should show details on the options\current option.

i took some basics from Google Code Archive - Long-term storage for Google Code Project Hosting.
but they lack of data validation and interaction on the fly.

if anyone have a nice idea i will be happy to hear.

Thanks,
Eliezer

On Fri, Jul 27, 2012 at 3:01 AM, Eliezer C. [email protected]
wrote:

I want to write some basic cisco like Cli.

What is “cisco like Cli”?

have seen “highline” which is very nice but i want some auto-completion and
data validation on auto-completion.

Sounds like you want readline.

i dont want a command line arguments … but like irb.
i have couple types of data such as IP addresses commands subcommands and
options in the command.
i have seen highlight and irb/completion.rb.
i’m sure someone wrote some nice library just for this kind of stuff.
most of the examples that i have seen are nice but dont give me what i
really need.

See above.

Cheers

robert

On 7/30/2012 10:41 AM, Robert K. wrote:

i dont want a command line arguments … but like irb.

robert

Thanks robert,

I have seen readline but i dont quite understand how to implement the
“?” and “tab” functions.
there is an autocomplition proc something there but it so unclear
because it uses the last word which i dont want to…
i want to look at the whole “line”…

if you have some expirence ou can share with me about it i will be very
happy.

Thanks,
Eliezer