Updates from BitShares FC #22
1 changed files with 8 additions and 7 deletions
|
|
@ -126,16 +126,17 @@ static char *my_rl_complete(char *token, int *match)
|
||||||
auto& cmd = cli_commands();
|
auto& cmd = cli_commands();
|
||||||
int partlen = strlen (token); /* Part of token */
|
int partlen = strlen (token); /* Part of token */
|
||||||
for (std::string it : cmd) {
|
for (std::string it : cmd) {
|
||||||
if (!strncmp ( it.c_str(), token, partlen)) {
|
if (!strncmp ( it.c_str(), token, partlen)) {
|
||||||
method_name = it;
|
method_name = it;
|
||||||
matchlen = partlen;
|
matchlen = partlen;
|
||||||
count ++;
|
count ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count == 1) {
|
if (count == 1) {
|
||||||
*match = 1;
|
*match = 1;
|
||||||
return strdup (method_name.c_str() + matchlen);
|
method_name += " ";
|
||||||
|
return strdup (method_name.c_str() + matchlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue