diff options
Diffstat (limited to 'src/session.ml')
| -rw-r--r-- | src/session.ml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/session.ml b/src/session.ml index f924591..0bd3d95 100644 --- a/src/session.ml +++ b/src/session.ml @@ -397,6 +397,20 @@ let reference_path_exists w _s path = let get_path_type ?(legacy_format=false) w _s path = RT.get_path_type_str ~legacy_format w.reference_tree path +let get_completion_env ?(legacy_format=false) w s path = + let op, path = + match path with + | [] -> raise (Session_error "Missing op and path") + | h :: tl -> (h, tl) + in + let config = get_proposed_config w s in + let res = + Vyos1x.Completion.get_completion_env_str ~legacy_format w.reference_tree config op path + in + match res with + | Ok env -> env + | Error e -> raise (Session_error e) + let write_running_cache w = (* alert exn Internal.write_internal: [Internal.Write_error] caught |
