add a `#pwd` directive

Closes #149
This commit is contained in:
Jeremie Dimino 2015-11-23 12:48:27 +00:00
parent b37ead142a
commit e608977856
1 changed files with 5 additions and 0 deletions

View File

@ -618,6 +618,11 @@ For a complete description of utop, look at the utop(1) manual page."));
macro; macro;
flush stdout)) flush stdout))
let () =
Hashtbl.add Toploop.directive_table "pwd"
(Toploop.Directive_none
(fun () -> print_endline (Sys.getcwd ())))
(* +-----------------------------------------------------------------+ (* +-----------------------------------------------------------------+
| Camlp4 | | Camlp4 |
+-----------------------------------------------------------------+ *) +-----------------------------------------------------------------+ *)