Honor R2_CFG_NEWSHELL=0 to disable it ##shell

This commit is contained in:
pancake 2020-12-28 19:19:09 +01:00 committed by pancake
parent 49349cb320
commit 4b60f0f2bb
3 changed files with 3 additions and 3 deletions

View File

@ -3392,7 +3392,7 @@ R_API int r_core_config_init(RCore *core) {
SETBPREF ("cfg.wseek", "false", "Seek after write");
SETCB ("cfg.bigendian", "false", &cb_bigendian, "Use little (false) or big (true) endianness");
p = r_sys_getenv ("R2_CFG_NEWSHELL");
SETCB ("cfg.newshell", p? "true": "false", &cb_newshell, "Use new commands parser");
SETCB ("cfg.newshell", r_str_bool (p && atoi (p)), &cb_newshell, "Use new commands parser");
free (p);
SETI ("cfg.cpuaffinity", 0, "Run on cpuid");

View File

@ -7094,7 +7094,7 @@ static int run_cmd_depth(RCore *core, char *cmd) {
R_API int r_core_cmd(RCore *core, const char *cstr, int log) {
if (core->use_tree_sitter_r2cmd) {
return r_cmd_status2int(core_cmd_tsr2cmd (core, cstr, false, log));
return r_cmd_status2int (core_cmd_tsr2cmd (core, cstr, false, log));
}
int ret = false, i;

View File

@ -1,8 +1,8 @@
NAME=seekinstr
FILE=bins//mach0/ired-arm64
ARGS=-e cfg.newshell=false
CMDS=<<EOF
# TODO: this test doesnt work on newshell
e cfg.newshell=false
afr
?v $Fe
s $I1@$Fe