From 686bd59a102977839d6ae043a61958a58cd761a4 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Tue, 6 Jan 2026 16:11:42 -0600 Subject: T8157: add missed case of vyconf completion, in the absence of valueHelp This is the analogue of the case for cli-shell-api: if the XML element valueHelp does not exist, use the element help. --- src/completion.ml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/completion.ml b/src/completion.ml index 4b84a99..ff04cb2 100644 --- a/src/completion.ml +++ b/src/completion.ml @@ -134,13 +134,19 @@ let get_completion_env_str ?(legacy_format=false) rtree ctree op cpath = let (comp_vals, comp_val, comp_help, help_format, help_string) = match path_typ with | `Tag | `Leaf | `Multi -> - let (compl_vals, _, _, value_help) = + let (compl_vals, _, help, value_help) = let a, b, c, d = List.fold_left func ([], [], [], []) comp in List.rev a, b, c, List.rev d in let value_help_fmt, value_help_string = List.split value_help in - (compl_vals, true, "", value_help_fmt, value_help_string) + begin + match value_help_string with + | [] -> + (compl_vals, true, "", ["txt"], help) + | _ -> + (compl_vals, true, "", value_help_fmt, value_help_string) + end | `Other | `Tag_value -> let (compl_vals, _, help, _) = let sorted_comp = -- cgit v1.2.3