Is there any command line editing package?

Hi
       I want to develop a command line environment using ruby, it can
           - edit the command line online, like vi mode or emacs mode
in bash
           - support command history and history searching
           - the command is not the real shell command. It is just a
string , when hit enter, this string will pass to another class to
interpret.

        Is there any package to use?
       Or any other advice?

Something like Readline?

-Rob

Rob Biedenharn http://agileconsultingllc.com
Rob@AgileConsultingLLC.com

···

On Jul 24, 2007, at 10:20 AM, haomiao wrote:

Hi
       I want to develop a command line environment using ruby, it can
           - edit the command line online, like vi mode or emacs mode
in bash
           - support command history and history searching
           - the command is not the real shell command. It is just a
string , when hit enter, this string will pass to another class to
interpret.

        Is there any package to use?
       Or any other advice?

You could also pick up cmd [0], which is no longer in development but is
fairly easily extended and might well suffice for simple cases.

[0] http://rubyforge.org/projects/cmd

···

-----Original Message-----
From: Rob Biedenharn [mailto:Rob@AgileConsultingLLC.com]
Sent: Tuesday, July 24, 2007 7:31 AM
To: ruby-talk ML
Subject: Re: Is there any command line editing package?

On Jul 24, 2007, at 10:20 AM, haomiao wrote:

> Hi
> I want to develop a command line environment using
ruby, it can
> - edit the command line online, like vi mode or
emacs mode
> in bash
> - support command history and history searching
> - the command is not the real shell command. It
is just a
> string , when hit enter, this string will pass to another class to
> interpret.
>
> Is there any package to use?
> Or any other advice?

Something like Readline?

GNU Readline - Wikipedia

-Rob

Rob Biedenharn http://agileconsultingllc.com
Rob@AgileConsultingLLC.com

Yes! the Readline module, thanks

···

On 7 24 , 10 31 , Rob Biedenharn <R...@AgileConsultingLLC.com> wrote:

On Jul 24, 2007, at 10:20 AM, haomiao wrote:

> Hi
> I want to develop a command line environment using ruby, it can
> - edit the command line online, like vi mode or emacs mode
> in bash
> - support command history and history searching
> - the command is not the real shell command. It is just a
> string , when hit enter, this string will pass to another class to
> interpret.

> Is there any package to use?
> Or any other advice?

Something like Readline?

GNU Readline - Wikipedia

-Rob

Rob Biedenharn http://agileconsultingllc.com
R...@AgileConsultingLLC.com