~emersion/mrsh

bc2cdd7ab381b31c49e957489c938d55efdca9ec — Simon Ser a month ago f70c3a1
builtin/set: toggle job control at runtime

Closes: https://github.com/emersion/mrsh/issues/113
1 files changed, 8 insertions(+), 2 deletions(-)

M builtin/set.c
M builtin/set.c => builtin/set.c +8 -2
@@ 206,8 206,14 @@ static int set(struct mrsh_state *state, struct mrsh_init_args *init_args,
}

int builtin_set(struct mrsh_state *state, int argc, char *argv[]) {
	// TODO: support enabling/disabling job control at runtime
	return set(state, NULL, argc, argv);
	int ret = set(state, NULL, argc, argv);
	if (ret != 0) {
		return ret;
	}
	if (!mrsh_set_job_control(state, state->options & MRSH_OPT_MONITOR)) {
		return 1;
	}
	return 0;
}

int mrsh_process_args(struct mrsh_state *state, struct mrsh_init_args *args,