String fname = field.Name;
- if (fname == "__name" || fname == "templates")
+ if (fname == "__name" || fname == "templates" || fname == "type")
continue;
String suggestion = fname + "=";
std::vector<String> RepositoryObjectCommand::GetPositionalSuggestions(const String& word) const
{
- const Type *ptype = Type::GetByName(m_Type);
- ASSERT(ptype);
- return GetFieldCompletionSuggestions(ptype, word);
+ if (m_Command == RepositoryCommandAdd) {
+ const Type *ptype = Type::GetByName(m_Type);
+ ASSERT(ptype);
+ return GetFieldCompletionSuggestions(ptype, word);
+ } else
+ return CLICommand::GetPositionalSuggestions(word);
}
/**