diff --git a/libr/config/config.c b/libr/config/config.c index e9c0f48ebf..c83b472ebc 100644 --- a/libr/config/config.c +++ b/libr/config/config.c @@ -163,7 +163,7 @@ R_API void r_config_list(RConfig *cfg, const char *str, int rad) { const char *sfx = ""; const char *pfx = ""; int len = 0; - bool verbose = false; + bool found, verbose = false; PJ *pj = NULL; if (!IS_NULLSTR (str)) { @@ -215,17 +215,23 @@ R_API void r_config_list(RConfig *cfg, const char *str, int rad) { case 2: r_list_foreach (cfg->nodes, iter, node) { if (!str || (str && (!strncmp (str, node->name, len)))) { - if (!str || !strncmp (str, node->name, len)) { - if (R_STR_ISNOTEMPTY (str)) { - cfg->cb_printf ("%s\n", r_str_get (node->desc)); - } else { - cfg->cb_printf ("%20s: %s\n", node->name, - r_str_get (node->desc)); - } - } + cfg->cb_printf ("%20s: %s\n", node->name, r_str_get (node->desc)); } } break; + case 3: + found = false; + r_list_foreach (cfg->nodes, iter, node) { + if (!str || (str && (!strcmp (str, node->name)))) { + found = true; + cfg->cb_printf ("%s\n", r_str_get (node->desc)); + break; + } + } + if (!found) { + cfg->cb_printf ("Key not found. Try e??%s\n", str); + } + break; case 's': if (str && *str) { r_list_foreach (cfg->nodes, iter, node) { diff --git a/libr/core/cmd_eval.c b/libr/core/cmd_eval.c index c463abac4d..d5ea8784a4 100644 --- a/libr/core/cmd_eval.c +++ b/libr/core/cmd_eval.c @@ -420,7 +420,7 @@ static int cmd_eval(void *data, const char *input) { switch (input[1]) { case '\0': r_core_cmd_help (core, help_msg_e); break; case '?': r_config_list (core->config, input + 2, 2); break; - default: r_config_list (core->config, input + 1, 2); break; + default: r_config_list (core->config, input + 1, 3); break; } break; case 't': // "et"