summaryrefslogtreecommitdiff
path: root/src/completion.ml
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2026-01-08 12:31:24 +0000
committerGitHub <noreply@github.com>2026-01-08 12:31:24 +0000
commitc2d199b78fe2cbdc6918e359a68cff92fcae37b7 (patch)
tree3d1f7a894914555614e994546c9f9ceb29b5590e /src/completion.ml
parent6cae8dc757c436972485f6e9baa5f4adf8e5e300 (diff)
parent686bd59a102977839d6ae043a61958a58cd761a4 (diff)
downloadvyos1x-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/completion.ml')
-rw-r--r--src/completion.ml10
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 =