summaryrefslogtreecommitdiff
path: root/src/vyconf_client.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/vyconf_client.ml')
-rw-r--r--src/vyconf_client.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vyconf_client.ml b/src/vyconf_client.ml
index 8a8dc46..6b6c6f1 100644
--- a/src/vyconf_client.ml
+++ b/src/vyconf_client.ml
@@ -245,3 +245,12 @@ let get_path_type client path =
| Success -> unwrap resp.output |> Lwt.return
| Fail -> Error (Option.value resp.error ~default:"") |> Lwt.return
| _ -> Error (Option.value resp.error ~default:"") |> Lwt.return
+
+let get_completion_env client path =
+ let req = Get_completion_env {path=path; legacy_format=true;} in
+ let%lwt resp = do_request client req in
+ match resp.status with
+ | Success -> unwrap resp.output |> Lwt.return
+ (* legacy getCompletionEnv is silent on error *)
+ | Fail -> Error "" |> Lwt.return
+ | _ -> Error (Option.value resp.error ~default:"") |> Lwt.return