mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-07-03 10:01:16 -03:00
Add a $status_generation variable that's incremented for each interactive command that produces a status.
This can be used to determine whether the previous command produced a real status, or just carried over the status from the command before it. Backgrounded commands and variable assignments will not increment status_generation, all other commands will.
This commit is contained in:
@@ -393,6 +393,7 @@ end_execution_reason_t parse_execution_context_t::run_function_statement(
|
||||
buffered_output_stream_t errs(0);
|
||||
io_streams_t streams(outs, errs);
|
||||
int err = builtin_function(*parser, streams, arguments, pstree, statement);
|
||||
parser->libdata().status_count++;
|
||||
parser->set_last_statuses(statuses_t::just(err));
|
||||
|
||||
wcstring errtext = errs.contents();
|
||||
|
||||
Reference in New Issue
Block a user