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 http://code.google.com/p/mf-firewall/
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

···

--
Eliezer Croitoru
https://www1.ngtech.co.il
IT consulting for Nonprofit organizations
eliezer <at> ngtech.co.il

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 Fri, Jul 27, 2012 at 3:01 AM, Eliezer Croitoru <eliezer@ngtech.co.il> wrote:

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

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

···

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

On Fri, Jul 27, 2012 at 3:01 AM, Eliezer Croitoru <eliezer@ngtech.co.il> 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

--
Eliezer Croitoru
https://www1.ngtech.co.il
IT consulting for Nonprofit organizations
eliezer <at> ngtech.co.il