diff --git a/libr/core/cmd_log.c b/libr/core/cmd_log.c index 894bbdc6a7..e288154a90 100644 --- a/libr/core/cmd_log.c +++ b/libr/core/cmd_log.c @@ -24,7 +24,7 @@ static const char *help_msg_L[] = { "La", "[qj]", "list asm/anal plugins (see: aL, e asm.arch=" "??" ")", "Lc", "", "list core plugins (see", "Ld", "", "list debug plugins (dL)", - "LD", "", "list supported decompilers (e cmd.pdc=?)", + "LD", "[j]", "list supported decompilers (e cmd.pdc=?)", "Le", "", "list esil plugins", "Lg", "", "list egg plugins", "Lh", "", "list hash plugins (ph)", @@ -369,6 +369,26 @@ static int cmd_plugins(void *data, const char *input) { case 'D': // "LD" if (input[1] == ' ') { r_core_cmdf (core, "e cmd.pdc=%s", r_str_trim_head_ro (input + 2)); + } else if (input[1] == 'j') { + char *deco; + RListIter *iter; + char *decos = r_core_cmd_str (core, "e cmd.pdc=?"); + RList *list = r_str_split_list (decos, "\n", 0); + PJ *pj = r_core_pj_new (core); + pj_o (pj); + pj_ka (pj, "decompilers"); + r_list_foreach (list, iter, deco) { + if (*deco) { + pj_s (pj, deco); + } + } + pj_end (pj); + pj_end (pj); + char *s = pj_drain (pj); + r_cons_printf ("%s\n", s); + free (s); + r_list_free (list); + free (decos); } else { r_core_cmd0 (core, "e cmd.pdc=?"); }