mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-24 01:11: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:
@@ -805,7 +805,7 @@ static void test_cancellation() {
|
||||
// Test for #3780
|
||||
// Ugly hack - temporarily set is_interactive_session
|
||||
// else we will SIGINT ourselves in response to our child death
|
||||
scoped_push<int> iis(&is_interactive_session, 1);
|
||||
scoped_push<bool> iis(&is_interactive_session, true);
|
||||
const wchar_t *child_self_destructor = L"while true ; sh -c 'sleep .25; kill -s INT $$' ; end";
|
||||
parser_t::principal_parser().eval(child_self_destructor, io_chain_t(), TOP);
|
||||
iis.restore();
|
||||
|
||||
Reference in New Issue
Block a user