Suggest opening bracket for list keys
Change-Id: I570f11aebfd68614b7a9af80c42d9f172c64e32f
diff --git a/src/parser.cpp b/src/parser.cpp
index cf433e2..26e417f 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -54,7 +54,11 @@
];
x3::phrase_parse(it, line.end(), grammar, space, parsedCommand);
- return filterByPrefix(ctx.m_suggestions, std::string(ctx.m_completionIterator, line.end()));
+ auto set = filterByPrefix(ctx.m_suggestions, std::string(ctx.m_completionIterator, line.end()));
+ if (set.size() == 1) {
+ return {(*set.begin()) + ctx.m_completionSuffix};
+ }
+ return set;
}
void Parser::changeNode(const dataPath_& name)