mirror of
https://git.freebsd.org/ports.git
synced 2025-06-07 13:50:38 -04:00
functionality to BSD editline and GNU readline. People familiar with the readline/editline capabilities for modern shells (such as bash and tcsh) will find most of the command editing features of JLine to be familiar. JLine is distributed under the BSD license, meaning that you are completely free to redistribute, modify, or sell it with almost no restrictions. API documentation can be found in the apidocs directory. You can use the jline.ConsoleRunner application to set up the system input stream and continue on the launch another program. For example, to use JLine as the input handler for the popular BeanShell console application, you can run: java jline.ConsoleRunner bsh.Interpreter WWW: http://jline.sourceforge.net/ PR: ports/116661 Submitted by: Martin Kammerhofer <mkamm at gmx.net>
22 lines
836 B
Java
22 lines
836 B
Java
--- src/src/main/java/jline/ConsoleRunner.java.orig 2007-03-09 16:32:28.000000000 +0100
|
|
+++ src/src/main/java/jline/ConsoleRunner.java 2007-09-24 19:22:42.000000000 +0200
|
|
@@ -17,6 +17,10 @@
|
|
* @author <a href="mailto:mwp1@cornell.edu">Marc Prud'hommeaux</a>
|
|
*/
|
|
public class ConsoleRunner {
|
|
+ private static ConsoleReader reader;
|
|
+
|
|
+ public static ConsoleReader getReader() { return reader; }
|
|
+
|
|
public static final String property = "jline.history";
|
|
|
|
public static void main(final String[] args) throws Exception {
|
|
@@ -36,7 +40,7 @@
|
|
String mainClass = (String) argList.remove(0);
|
|
|
|
// setup the inpout stream
|
|
- ConsoleReader reader = new ConsoleReader();
|
|
+ reader = new ConsoleReader();
|
|
|
|
if (historyFileName != null) {
|
|
reader.setHistory(new History (new File
|