linenoise

AuthorEdgar Aroutiounian <edgar.factorial@gmail.com>
LicenseBSD-3-clause
Homepagehttps://github.com/fxfactorial/ocaml-linenoise
Issue Trackerhttps://github.com/fxfactorial/ocaml-linenoise/issues
MaintainerEdgar Aroutiounian <edgar.factorial@gmail.com>
Dependencies
&oasis>= 0.4
ocamlfind
PublishedMar 10, 2016
Source [http] https://github.com/fxfactorial/ocaml-linenoise/archive/v0.9.0.tar.gz
90fd86ede3d31cee3f6380f5b35c9199
StatisticsInstalled 5 times last month.
Edithttps://github.com/ocaml/opam-repository/tree/master/packages/linenoise/linenoise.0.9.0/opam

Simple readline like functionality

These are self contained OCaml bindings to linenoise, no system libraries needed at all.

Here's the simplest program:

let rec user_input prompt cb = match LNoise.linenoise prompt with | None -> () | Some v -> cb v;

user_input prompt cb

let () = (fun from_user -> Printf.sprintf "Got: %s" from_user |> print_endline) |> user_input "test_program> "

and compile with: $ ocamlfind ocamlopt ex.ml -package linenoise -linkpkg -o T

Necessary for
links
>= 0.7
ogen
0.1.4