From d168ec3c5e04efb5f401cfcbe60c021093cd465b Mon Sep 17 00:00:00 2001 From: katherine Date: Thu, 6 Dec 2018 11:54:26 -0700 Subject: synchronise common prompts the same across shell, iex, utop, but colour-coded and with a which thing and version hint --- .ocamlinit | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.ocamlinit') diff --git a/.ocamlinit b/.ocamlinit index a125263..4ff80ec 100644 --- a/.ocamlinit +++ b/.ocamlinit @@ -14,12 +14,14 @@ let path = else path in +let user = Unix.getlogin () in let version = Sys.ocaml_version in let host = Unix.gethostname () in let formatted = LTerm_text.eval [B_bold true; B_fg (LTerm_style.white); S "ā”Œ["; - B_fg (LTerm_style.lmagenta); S (Printf.sprintf "ocaml-%s@%s " version host); + B_fg (LTerm_style.lyellow); S (Printf.sprintf "%s@" user); + S (Printf.sprintf "ocaml-%s@%s " version host); B_fg (LTerm_style.lcyan); S (Printf.sprintf "%s" path); B_fg (LTerm_style.white); S "]\nā””: "] in UTop.prompt := fst (React.S.create formatted);; -- cgit v1.2.3