let open_in_dollar_editor file =
let editor =
try Sys.getenv "EDITOR"
with _ ->
Log.(s "Using `vi` since $EDITOR is not defined" @ warning);
"vi" in
let command = fmt "%s %s" editor file in
Log.(s "Running " % s command @ verbose);
(* We actually want (for now) to block the whole process and wait for
the editor to end. *)
ignore (Sys.command command);
return ()