diff options
| author | Daniil Baturin <daniil@vyos.io> | 2026-01-08 12:31:24 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-08 12:31:24 +0000 |
| commit | c2d199b78fe2cbdc6918e359a68cff92fcae37b7 (patch) | |
| tree | 3d1f7a894914555614e994546c9f9ceb29b5590e /src | |
| parent | 6cae8dc757c436972485f6e9baa5f4adf8e5e300 (diff) | |
| parent | 686bd59a102977839d6ae043a61958a58cd761a4 (diff) | |
| download | vyos1x-config-c2d199b78fe2cbdc6918e359a68cff92fcae37b7.tar.gz vyos1x-config-c2d199b78fe2cbdc6918e359a68cff92fcae37b7.zip | |
Merge pull request #63 from jestabro/missing-tag-value-completion
T8157: add missed case of vyconf completion, in the absence of valueHelp
Diffstat (limited to 'src')
| -rw-r--r-- | src/completion.ml | 10 |
1 files changed, 8 insertions, 2 deletions
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 = |
