add --model suggestion desc if available
@@ -251,7 +251,11 @@ func findDynamicSuggestions(annotation string, doc goprompt.Document) []goprompt
return yangPathCompleter.Complete(doc)
case "MODEL":
suggestions := make([]goprompt.Suggest, 0, len(schemaTree.Dir))
- for name := range schemaTree.Dir {
+ for name, dir := range schemaTree.Dir {
+ if dir != nil {
+ suggestions = append(suggestions, goprompt.Suggest{Text: name, Description: dir.Description})
+ continue
+ }
suggestions = append(suggestions, goprompt.Suggest{Text: name})
}
return goprompt.FilterHasPrefix(suggestions, doc.GetWordBeforeCursor(), true)
