beanshell2
beanshell2 copied to clipboard
Implement Libedit/Readline support for CLI beanshell instances
Would it be possible to implement one of the various Readline/libedit wrappers
in the command line version of beanshell? When using beanshell as an
interactive Java interpreter, the lack of typical shell functionality such as
command history is extremely frustrating.
There is a patch to beanshell included in the Java-readline
(http://java-readline.sourceforge.net/) project's source archive that
implements this functionality using their package. That could be used as a
starting point for this feature request.
Original issue reported on code.google.com by [email protected] on 25 Sep 2011 at 8:07
That's easily done with jline. You can download the jar from:
http://jline.sourceforge.net/index.html
I assume you put your jars in /opt/lib. Run:
java -cp /opt/lib/jline.jar:/opt/lib/bsh-2.1b5.jar jline.ConsoleRunner
bsh.Interpreter
Voila! Beanshell with readline capabilities ;-)
Original comment by [email protected] on 29 May 2012 at 1:31
Interesting. Thanks for the reply. I'll give this a shot.
Any reason this functionality should not be bundle with BeanShell by default?
Seems like a necessary feature, given the expectations created by the average
REPL and interactive interpreters.
Original comment by [email protected] on 29 May 2012 at 1:34
Well I guess many people don't run Beanshell in interactive mode (I don't), so
it is no use to bloat the jar...
Personally, I would prefer to keep it the way it is now.
Original comment by [email protected] on 29 May 2012 at 2:12