mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-19 04:41:15 -03:00
implement status is-breakpoint
This implements `status is-breakpoint` that returns true if the current shell prompt is displayed in the context of a `breakpoint` command. This also fixes several bugs. Most notably making `breakpoint` a no-op if the shell isn't interactive. Also, typing `breakpoint` at an interactive prompt should be an error rather than creating a new nested debugging context. Partial fix for #1310
This commit is contained in:
@@ -1130,7 +1130,7 @@ void exec_job(parser_t &parser, job_t *j) {
|
||||
static int exec_subshell_internal(const wcstring &cmd, wcstring_list_t *lst,
|
||||
bool apply_exit_status) {
|
||||
ASSERT_IS_MAIN_THREAD();
|
||||
int prev_subshell = is_subshell;
|
||||
bool prev_subshell = is_subshell;
|
||||
const int prev_status = proc_get_last_status();
|
||||
bool split_output = false;
|
||||
|
||||
@@ -1139,7 +1139,7 @@ static int exec_subshell_internal(const wcstring &cmd, wcstring_list_t *lst,
|
||||
split_output = true;
|
||||
}
|
||||
|
||||
is_subshell = 1;
|
||||
is_subshell = true;
|
||||
int subcommand_status = -1; // assume the worst
|
||||
|
||||
// IO buffer creation may fail (e.g. if we have too many open files to make a pipe), so this may
|
||||
|
||||
Reference in New Issue
Block a user