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.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107247 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectMultiword.cpp b/source/Commands/CommandObjectMultiword.cpp
index d8e8f54..88c3eed 100644
--- a/source/Commands/CommandObjectMultiword.cpp
+++ b/source/Commands/CommandObjectMultiword.cpp
@@ -219,9 +219,14 @@
int &cursor_char_position,
int match_start_point,
int max_return_elements,
+ bool &word_complete,
StringList &matches
)
{
+ // Any of the command matches will provide a complete word, otherwise the individual
+ // completers will override this.
+ word_complete = true;
+
if (cursor_index == 0)
{
CommandObject::AddNamesMatchingPartialString (m_subcommand_dict,
@@ -245,7 +250,8 @@
input, cursor_index,
cursor_char_position,
match_start_point,
- max_return_elements,
+ max_return_elements,
+ word_complete,
matches);
}
else
@@ -273,7 +279,8 @@
cursor_index,
cursor_char_position,
match_start_point,
- max_return_elements,
+ max_return_elements,
+ word_complete,
matches);
}