display the help for the % command (#7283)

This commit is contained in:
Pepe Vila 2017-04-16 09:42:30 +02:00 committed by radare
parent 97cb38258b
commit 910d65da02

View File

@ -1105,7 +1105,24 @@ static int cmd_pointer(void *data, const char *input) {
}
static int cmd_env(void *data, const char *input) {
return r_core_cmdf ((RCore*)data, "env %s", input);
RCore *core = (RCore*)data;
int ret = true;
switch (*input) {
case '?':
{
const char* help_msg[] = {
"Usage:", "%[name[=value]]", "Set each NAME to VALUE in the environment",
"%", "", "list all environment variables",
"%", "SHELL", "prints SHELL value",
"%", "TMPDIR=/tmp", "sets TMPDIR value to \"/tmp\"",
NULL};
r_core_cmd_help (core, help_msg);
}
break;
default:
ret = r_core_cmdf (core, "env %s", input);
}
return ret;
}
static int cmd_system(void *data, const char *input) {