removed loadcompletion callback from ipc
This commit is contained in:
parent
4531a3406e
commit
12e4cab287
28
src/ipc.cpp
28
src/ipc.cpp
@ -395,34 +395,6 @@ static int cat_completionCallback(const char *c_partial, char commands[COMMAND_C
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int load_CompletionCallback(const char *c_partial, char commands[COMMAND_COMPLETION_MAXITEMS][COMMAND_COMPLETION_ITEM_LENGTH])
|
|
||||||
{
|
|
||||||
std::string partial = c_partial;
|
|
||||||
std::array<std::string, 2> parts{};
|
|
||||||
auto j = 0u;
|
|
||||||
auto f = false;
|
|
||||||
int count = 0;
|
|
||||||
|
|
||||||
for (auto i = 0u; i < partial.size() && j < 3; ++i)
|
|
||||||
{
|
|
||||||
auto space = (bool) isspace(partial.at(i));
|
|
||||||
if (!space)
|
|
||||||
{
|
|
||||||
if (j)
|
|
||||||
parts.at(j - 1).push_back(partial[i]);
|
|
||||||
f = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i == partial.size() - 1 || (f && space))
|
|
||||||
{
|
|
||||||
if (space)
|
|
||||||
++j;
|
|
||||||
f = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
static InitRoutine init([]() {
|
static InitRoutine init([]() {
|
||||||
getAndSortAllVariables();
|
getAndSortAllVariables();
|
||||||
exec_sync.cmd->m_bHasCompletionCallback = true;
|
exec_sync.cmd->m_bHasCompletionCallback = true;
|
||||||
|
Reference in New Issue
Block a user