On Feb 11, 9:27 pm, Matthieu Riou <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I find consoles, for all "scripting" languages very useful. It's a
> really nice way to try out things and test some very specific
> behaviors. However I'm getting more and more annoyed by the Rhino
> console. The fact that you can't simply go back and forth on the line
> you're typing, editing portions or correcting typos, is inconvenient
> at best. I'm aware it's a problem with Java (what?! a native console?
> how ugly!), that makes these things very awkward, rather than
> something that should be laid at Rhino's feet.
>
> There's a very nice little BSD licensed library, called JLine [1],
> that can add "modern" command lines features like line editing,
> command history (how useful) and even completion (the cherry on the
> cake). I came to a point where I'm more than willing to do the
> integration and propose a patch but before I wanted to see if you'd be
> willing to add JLine as a dependency. Rhino has very few dependency so
> far and it's good to keep it that way, although this one would
> probably only be needed when you use the shell. And I could even come
> up with a way to make it optional, falling back to using System.in
> when JLine is not present.
>
> Thoughts and opinions?
>
> Thanks!
> Matthieu
>
> [1]http://jline.sourceforge.net

There's a very handy utility called "rlwrap" which easily gives you
all the readline features on any command line app, and it works quite
well with Rhino's console.

http://utopia.knoware.nl/~hlub/rlwrap/

-Tom
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to