Stop fish --no-execute harder from executing stuff

I'm not quite sure what it executed - I think it's just constructing jobs and
stuff, but it did show up in the profile - 21% spent on "job_reap".
This commit is contained in:
Fabian Homborg 2020-02-17 14:21:43 +01:00
parent 65883e0e40
commit fba4363c1d

View File

@ -1186,6 +1186,9 @@ end_execution_reason_t parse_execution_context_t::run_1_job(tnode_t<g::job> job_
return *ret;
}
// We definitely do not want to execute anything if we're told we're --no-execute!
if (no_exec()) return end_execution_reason_t::ok;
// Get terminal modes.
struct termios tmodes = {};
if (parser->is_interactive() && tcgetattr(STDIN_FILENO, &tmodes)) {