Colorize RzIL in ao standard output like plf (#6473)

The `rzil:` line printed by `ao` (and its `aoX` standard-mode variants)
was emitted without syntax highlighting, unlike `plf`/`aoi` which color
the RzIL effect body. Route the stringified body through the existing
`rz_core_il_colorize_body()` helper (the same one used by `plf` and the
bit editor) when `scr.color` is enabled, so parentheses, IL operations,
numbers and variables are colored consistently.

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
This commit is contained in:
NOT XVilka 2026-06-10 03:21:57 +08:00 committed by GitHub
parent 80f14bf6fc
commit b83c518d8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -552,7 +552,16 @@ static void core_analysis_bytes_standard(RzCore *core, const ut8 *buf, int len,
if (op->il_op) {
RzStrBuf *sbil = rz_strbuf_new("");
rz_il_op_effect_stringify(op->il_op, sbil, false);
PRINTF_LN_STR("rzil", rz_strbuf_get(sbil));
const char *ilstr = rz_strbuf_get(sbil);
if (RZ_STR_ISNOTEMPTY(ilstr)) {
if (use_color) {
rz_cons_printf("%srzil: " Color_RESET, color);
rz_core_il_colorize_body(core->cons->context, ilstr);
rz_cons_newline();
} else {
rz_cons_printf("rzil: %s\n", ilstr);
}
}
rz_strbuf_free(sbil);
}
if (op->opex) {