OCaml port of Linenoise
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Example using hard-coded ANSI escape sequences

+1 -4
+1 -4
example/main.ml
··· 1 1 let () = 2 2 Fmt_tty.setup_std_outputs (); 3 3 let rec loop sys_break = 4 - let prompt = 5 - if sys_break then Fmt.str "[%a] >> " Fmt.(styled (`Fg `Red) int) 130 6 - else ">> " 7 - in 4 + let prompt = if sys_break then "[\x1b[31m130\x1b[0m] >> " else ">> " in 8 5 match Bruit.bruit prompt with 9 6 | String (Some s) -> 10 7 Fmt.pr "%s\n%!" s;