Add ?ee and ?ei command for stderr echos ##shell

This commit is contained in:
pancake 2023-04-05 13:25:40 +02:00
parent 91d5c5c98f
commit 259cf507f4
2 changed files with 9 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* radare2 - LGPL - Copyright 2009-2022 - pancake */
/* radare2 - LGPL - Copyright 2009-2023 - pancake */
#include <r_core.h>

View File

@ -246,6 +246,8 @@ static RCoreHelpMessage help_msg_question_e = {
"?ea", " text", "ascii art echo (seven segment text, same as ~?ea",
"?eb", " 10 20 30", "proportional segments bar",
"?ed", " 1", "draw a 3D ascii donut at the given animation frame",
"?ee", " msg", "stderr message",
"?ei", " msg", "R_LOG_INFO message",
"?eg", " 10 20", "move cursor to column 10, row 20",
"?ef", " text", "echo text with thin ascii art frame around",
"?en", " nonl", "echo message without ending newline",
@ -1241,6 +1243,12 @@ static int cmd_help(void *data, const char *input) {
free (s);
}
break;
case 'e': // "?ee"
eprintf ("%s\n", r_str_trim_head_ro (input + 2));
break;
case 'i': // "?ei"
R_LOG_INFO ("%s", r_str_trim_head_ro (input + 2));
break;
case 'd': // "?ed"
if (input[2] == 'd') {
int i,j;