Suggest opening bracket for list keys
Change-Id: I570f11aebfd68614b7a9af80c42d9f172c64e32f
diff --git a/src/ast_handlers.hpp b/src/ast_handlers.hpp
index fede04c..dd80889 100644
--- a/src/ast_handlers.hpp
+++ b/src/ast_handlers.hpp
@@ -619,11 +619,21 @@
if (generateMissingKeyCompletionSet(keysNeeded, parserContext.m_tmpListKeys).empty()) {
parserContext.m_suggestions = {"]/"};
} else {
- parserContext.m_suggestions = {"]"};
+ parserContext.m_suggestions = {"]["};
}
}
};
+struct suggestKeysStart_class {
+ template <typename T, typename Iterator, typename Context>
+ void on_success(Iterator const&, Iterator const&, T&, Context const& context)
+ {
+ auto& parserContext = x3::get<parser_context_tag>(context);
+
+ parserContext.m_completionSuffix = "[";
+ }
+};
+
struct commandNamesVisitor {
template <typename T>
auto operator()(boost::type<T>)