aboutsummaryrefslogtreecommitdiffstats
path: root/.ocamlinit
diff options
context:
space:
mode:
Diffstat (limited to '.ocamlinit')
-rw-r--r--.ocamlinit9
1 files changed, 5 insertions, 4 deletions
diff --git a/.ocamlinit b/.ocamlinit
index 76ad6c0..f03d1c6 100644
--- a/.ocamlinit
+++ b/.ocamlinit
@@ -2,22 +2,23 @@
#thread;;
#require "core";;
+#require "core_unix";;
open Core;;
#require "lambda-term";;
-let path = Sys.getcwd () in
-let home = Sys.home_directory () in
+let path = Core_unix.getcwd () in
+let home = Sys.getenv_exn "HOME" in
let path =
if Zed_utf8.starts_with path home then
Zed_utf8.replace path 0 (Zed_utf8.length home) "~"
else
path
in
-let user = Unix.getlogin () in
+let user = Core_unix.getlogin () in
let version = Sys.ocaml_version in
-let host = Unix.gethostname () in
+let host = Core_unix.gethostname () in
let formatted = LTerm_text.eval
[B_bold true;
B_fg (LTerm_style.white); S "┌[";