aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectPlatform.cpp
diff options
context:
space:
mode:
authorGongyu Deng <gy_deng@icloud.com>2020-08-10 20:10:18 +0200
committerRaphael Isemann <teemperor@gmail.com>2020-08-10 20:14:46 +0200
commite3820570d406f56a25eee681df03a394882febb0 (patch)
treee65e61a82899d91040c0968efde2c79adb167f99 /lldb/source/Commands/CommandObjectPlatform.cpp
parent6fe6b29c294e8ad7eb9842e2a5e9b6334ecf9483 (diff)
downloadllvm-e3820570d406f56a25eee681df03a394882febb0.zip
llvm-e3820570d406f56a25eee681df03a394882febb0.tar.gz
llvm-e3820570d406f56a25eee681df03a394882febb0.tar.bz2
[lldb] tab completion for `platform target-install`
1. Applied the common completion `eDiskFileCompletion` to the first argument of the command `platform target-install`. 2. Added a related test case. Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D84179
Diffstat (limited to 'lldb/source/Commands/CommandObjectPlatform.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectPlatform.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp
index fcc8af6..4c235cb 100644
--- a/lldb/source/Commands/CommandObjectPlatform.cpp
+++ b/lldb/source/Commands/CommandObjectPlatform.cpp
@@ -1706,6 +1706,16 @@ public:
~CommandObjectPlatformInstall() override = default;
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override {
+ if (request.GetCursorIndex())
+ return;
+ CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), CommandCompletions::eDiskFileCompletion,
+ request, nullptr);
+ }
+
bool DoExecute(Args &args, CommandReturnObject &result) override {
if (args.GetArgumentCount() != 2) {
result.AppendError("platform target-install takes two arguments");