diff --git a/libr/core/cmd.c b/libr/core/cmd.c index 73ff07cb27..95bce01c46 100644 --- a/libr/core/cmd.c +++ b/libr/core/cmd.c @@ -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) {