mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-03 12:12:06 +00:00
Improve |? (#14003)
This commit is contained in:
parent
a653672d67
commit
511ddbdfc8
@ -287,6 +287,16 @@ static const char *help_msg_triple_exclamation[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const char *help_msg_vertical_bar[] = {
|
||||||
|
"Usage:", "[cmd] | [program|H|T|]", "",
|
||||||
|
"", "[cmd] |?", "show this help",
|
||||||
|
"", "[cmd] |", "disable scr.html and scr.color",
|
||||||
|
"", "[cmd] |H", "enable scr.html, respect scr.color",
|
||||||
|
"", "[cmd] |T", "use scr.tts to speak out the stdout",
|
||||||
|
"", "[cmd] | [program]", "pipe output of command to program",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
R_API void r_core_cmd_help(const RCore *core, const char *help[]) {
|
R_API void r_core_cmd_help(const RCore *core, const char *help[]) {
|
||||||
r_cons_cmd_help (help, core->print->flags & R_PRINT_FLAGS_COLOR);
|
r_cons_cmd_help (help, core->print->flags & R_PRINT_FLAGS_COLOR);
|
||||||
}
|
}
|
||||||
@ -2411,12 +2421,7 @@ static int r_core_cmd_subst_i(RCore *core, char *cmd, char *colon, bool *tmpseek
|
|||||||
*ptr = '\0';
|
*ptr = '\0';
|
||||||
cmd = r_str_trim_nc (cmd);
|
cmd = r_str_trim_nc (cmd);
|
||||||
if (!strcmp (ptr + 1, "?")) { // "|?"
|
if (!strcmp (ptr + 1, "?")) { // "|?"
|
||||||
// TODO: should be disable scr.color in pd| ?
|
r_core_cmd_help (core, help_msg_vertical_bar);
|
||||||
eprintf ("Usage: <r2command> | <program|H|>\n");
|
|
||||||
eprintf (" pd|? - show this help\n");
|
|
||||||
eprintf (" pd| - disable scr.html and scr.color\n");
|
|
||||||
eprintf (" pd|H - enable scr.html, respect scr.color\n");
|
|
||||||
eprintf (" pi 1|T - use scr.tts to speak out the stdout\n");
|
|
||||||
r_list_free (tmpenvs);
|
r_list_free (tmpenvs);
|
||||||
return ret;
|
return ret;
|
||||||
} else if (!strncmp (ptr + 1, "H", 1)) { // "|H"
|
} else if (!strncmp (ptr + 1, "H", 1)) { // "|H"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user