From 7dcdfaa6a9e07ca1a5a5d65fb4bf4c9562d2c55f Mon Sep 17 00:00:00 2001 From: Leonid Rozenberg Date: Fri, 7 Oct 2016 12:14:58 -0400 Subject: [PATCH] Tab complete mod_use directives. --- src/lib/uTop_complete.cppo.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/uTop_complete.cppo.ml b/src/lib/uTop_complete.cppo.ml index 939d558..e76d5c3 100644 --- a/src/lib/uTop_complete.cppo.ml +++ b/src/lib/uTop_complete.cppo.ml @@ -947,8 +947,9 @@ let complete ~syntax ~phrase_terminator ~input = List.map (function (w, Directory) -> (w, "") | (w, File) -> (w, "\"" ^ phrase_terminator)) result) #endif - (* Completion on #use. *) - | [(Symbol "#", _); (Lident "use", _); (String (tlen, false), loc)] -> + (* Completion on #use and #mod_use *) + | [(Symbol "#", _); (Lident "use", _); (String (tlen, false), loc)] + | [(Symbol "#", _); (Lident "mod_use", _); (String (tlen, false), loc)] -> let file = String.sub input (loc.ofs1 + tlen) (String.length input - loc.ofs1 - tlen) in let filter name = match try Some (String.rindex name '.') with Not_found -> None with