mirror of https://github.com/Icinga/icinga2.git
Fix: Console auto-completion should take into account parent classes' prototypes
fixes #9843
This commit is contained in:
parent
f8a26d810c
commit
2109944580
|
@ -128,6 +128,7 @@ static char *ConsoleCompleteHelper(const char *word, int state)
|
|||
AddSuggestion(matches, word, pword + "." + field.Name);
|
||||
}
|
||||
|
||||
while (type) {
|
||||
Object::Ptr prototype = type->GetPrototype();
|
||||
Dictionary::Ptr dict = dynamic_pointer_cast<Dictionary>(prototype);
|
||||
|
||||
|
@ -137,6 +138,9 @@ static char *ConsoleCompleteHelper(const char *word, int state)
|
|||
AddSuggestion(matches, word, pword + "." + kv.first);
|
||||
}
|
||||
}
|
||||
|
||||
type = type->GetBaseType();
|
||||
}
|
||||
} catch (...) { /* Ignore the exception */ }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue