aboutsummaryrefslogtreecommitdiffstats
path: root/.ocamlinit
diff options
context:
space:
mode:
authorkatherine <shmibs@airen-no-jikken.icu>2018-12-06 11:54:26 -0700
committerkatherine <shmibs@airen-no-jikken.icu>2018-12-06 11:54:26 -0700
commitd168ec3c5e04efb5f401cfcbe60c021093cd465b (patch)
treec0f85841b00f27d8d8b6b0b72df8491188326d24 /.ocamlinit
parent8a1a6e410499cbc5c0685287847b290be7ccbba8 (diff)
downloaddotfiles-d168ec3c5e04efb5f401cfcbe60c021093cd465b.tar.gz
synchronise common prompts
the same across shell, iex, utop, but colour-coded and with a which thing and version hint
Diffstat (limited to '.ocamlinit')
-rw-r--r--.ocamlinit4
1 files changed, 3 insertions, 1 deletions
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);;