Work on merging completion tree with parse tree

This commit is contained in:
Kovid Goyal
2022-09-25 20:51:38 +05:30
parent 79ca0408e7
commit bf74413c1f
16 changed files with 285 additions and 232 deletions

View File

@@ -176,7 +176,7 @@ func option_from_spec(spec OptionSpec) (*Option, error) {
if ans.IsList {
ans.parsed_default = []string{}
}
ans.CompletionFunc = spec.CompletionFunc
ans.Completer = spec.Completer
if ans.Aliases == nil || len(ans.Aliases) == 0 {
return nil, fmt.Errorf("No --aliases specified for option")
}