Radare2: Keep color escape codes on

Created on 23 May 2016  Â·  3Comments  Â·  Source: radareorg/radare2

Mentioned this to @XVilka on IRC, right now radare2 always turns off colors when it's piped to another program. It would be nice if there was an option to keep/force colors on.

2016-05-23-01 08 04-screenshot

I was hoping to use aha to be able to export the colored disassembly to HTML.

consoleui enhancement

Most helpful comment

just use this var. it's documented in the source

       if (!r_config_get_i (core->config, "scr.pipecolor")) {
                pipecolor = r_config_get_i (core->config, "scr.color");
                r_config_set_i (core->config, "scr.color", 0);
        }

All 3 comments

Something like e io.esc_filter option would be nice. If true - it will filter escape sequences from the piping and redirecting output, if false - obviously not.

Maybe with || or something like this. I remember piping colors was really problematic in the past. Maybe we can enable it back and it will work fine now.

Need to test, but probably disabled by default and slowly testing it

On 23 May 2016, at 03:16, Anton Kochkov [email protected] wrote:

Something like e io.esc_filter option would be nice. If true - it will filter escape sequences from the piping and redirecting output, if false - obviously not.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

just use this var. it's documented in the source

       if (!r_config_get_i (core->config, "scr.pipecolor")) {
                pipecolor = r_config_get_i (core->config, "scr.color");
                r_config_set_i (core->config, "scr.color", 0);
        }
Was this page helpful?
0 / 5 - 0 ratings

Related issues

XVilka picture XVilka  Â·  6Comments

NotAFile picture NotAFile  Â·  6Comments

PaquitoRiviera picture PaquitoRiviera  Â·  7Comments

MariasStory picture MariasStory  Â·  6Comments

securitykitten picture securitykitten  Â·  4Comments