fix minify subshell applying on cd

This commit is contained in:
zawz 2021-08-14 13:46:47 +02:00
parent f27bb49626
commit 6e64ed64c4

View file

@ -284,7 +284,7 @@ bool r_has_env_set(_obj* in, bool* result)
}; break;
case _obj::block_cmd: {
cmd* t = dynamic_cast<cmd*>(in);
if(t->has_var_assign())
if(t->has_var_assign() || t->arg_string(0) == "cd")
*result = true;
}
default: break;