Skip to content

jfgiraud/jlinenoise

Repository files navigation

jlinenoise

description

jlinenoise is a java binding around the C linenoise library.

example

$ make clean run
......
......
......
Hello!
$ ls
read: ls
$ hello man

Follow the link to see the code of this example and use jlinenoise in your project.

The arrow keys (↑ ↓ → ←) are working... See the cursor below.

jlinenoise

Methods :

  • init()
  • linenoise(prompt)

An history file can be set.

Methods :

  • loadHistory(filepath)
  • addToHistory(line)
  • saveHistory(filepath)

integration

of the version v0.0.22

Download the jar

mvn install:install-file -Dfile=jlinenoise.jar -DgroupId=com.github.jfgiraud -DartifactId=jlinenoise -Dversion=v0.0.22 -Dpackaging=jar -DgeneratePom=true

Install the jar in your .m2 repository

mvn install:install-file -Dfile=jlinenoise.jar -DgroupId=com.github.jfgiraud -DartifactId=jlinenoise -Dversion=v0.0.22 -Dpackaging=jar -DgeneratePom=true

pom.xml

Introduce the dependency in your pom.xml

    <dependency>
        <groupId>com.github.jfgiraud</groupId>
        <artifactId>jlinenoise</artifactId>
        <version>v0.0.22</version>
    </dependency> 

code example

Follow the link to see the code of this example and use jlinenoise in your project.