[Lldb-commits] [PATCH] D152011: [lldb/Commands] Add support to auto-completion for user commands

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 2 11:11:23 PDT 2023


bulbazord added a comment.

So the idea behind this is fine to me, allowing custom commands to specify a completion style seems like a very nifty feature to have.

We should definitely add a test though. An API test or a Shell test where we create a custom command and then try to do some kind of completion on it would be good.



================
Comment at: lldb/include/lldb/Interpreter/CommandOptionArgumentTable.h:153-179
+    {lldb::eNoCompletion, "no-completion", nullptr},
+    {lldb::eSourceFileCompletion, "source-file", nullptr},
+    {lldb::eDiskFileCompletion, "disk-file", nullptr},
+    {lldb::eDiskDirectoryCompletion, "disk-directory", nullptr},
+    {lldb::eSymbolCompletion, "symbol", nullptr},
+    {lldb::eModuleCompletion, "module", nullptr},
+    {lldb::eSettingsNameCompletion, "settings-name", nullptr},
----------------
The `nullptr` argument for these is for the `usage`, yeah? We should probably add something... For example, `eSourceFileCompletion` could be something like "Completes to a source file" or something like this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152011/new/

https://reviews.llvm.org/D152011



More information about the lldb-commits mailing list