Autocomplete e <tab> ##shell (#17855)

This commit is contained in:
pancake 2020-10-27 19:05:57 +01:00 committed by GitHub
parent f318c2041f
commit b0228ca85b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1292,14 +1292,11 @@ static void autocomplete_evals(RCore *core, RLineCompletion *completion, const c
r_return_if_fail (str);
RConfigNode *bt;
RListIter *iter;
char *tmp = strrchr (str, ' ');
const char *tmp = strrchr (str, ' ');
if (tmp) {
str = tmp + 1;
}
int n = strlen (str);
if (n < 1) {
return;
}
size_t n = strlen (str);
r_list_foreach (core->config->nodes, iter, bt) {
if (!strncmp (bt->name, str, n)) {
r_line_completion_push (completion, bt->name);