summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/Options.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2010-06-30 05:02:46 +0000
committerJim Ingham <jingham@apple.com>2010-06-30 05:02:46 +0000
commit558ce124eb9787beae314effe12b3c17568625e1 (patch)
tree99a0ea792b6a91576c1e4e1e4b97202e2a54963e /lldb/source/Interpreter/Options.cpp
parente82689fea2a5f049ac3cfab705e6fac7ce1f0f21 (diff)
downloadbcm5719-llvm-558ce124eb9787beae314effe12b3c17568625e1.tar.gz
bcm5719-llvm-558ce124eb9787beae314effe12b3c17568625e1.zip
Add a source file completer to the CommandCompleters.
Add a way for the completers to say whether the completed argument should have a space inserted after is or not. Added the file name completer to the "file" command. llvm-svn: 107247
Diffstat (limited to 'lldb/source/Interpreter/Options.cpp')
-rw-r--r--lldb/source/Interpreter/Options.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/Options.cpp b/lldb/source/Interpreter/Options.cpp
index 5698b28c958..28f29225793 100644
--- a/lldb/source/Interpreter/Options.cpp
+++ b/lldb/source/Interpreter/Options.cpp
@@ -538,9 +538,12 @@ Options::HandleOptionCompletion
int char_pos,
int match_start_point,
int max_return_elements,
+ bool &word_complete,
lldb_private::StringList &matches
)
{
+ word_complete = true;
+
// For now we just scan the completions to see if the cursor position is in
// an option or its argument. Otherwise we'll call HandleArgumentCompletion.
// In the future we can use completion to validate options as well if we want.
@@ -658,6 +661,7 @@ Options::HandleOptionCompletion
i,
match_start_point,
max_return_elements,
+ word_complete,
matches);
return true;
}
@@ -688,6 +692,7 @@ Options::HandleOptionArgumentCompletion
int opt_element_index,
int match_start_point,
int max_return_elements,
+ bool &word_complete,
lldb_private::StringList &matches
)
{
@@ -754,6 +759,7 @@ Options::HandleOptionArgumentCompletion
match_start_point,
max_return_elements,
filter_ap.get(),
+ word_complete,
matches);
}
OpenPOWER on IntegriCloud