diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2f247f383..3d72b987a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -19,6 +19,7 @@ Interactive improvements - If the terminal definition for $TERM can't be used, fish now tries using the "xterm-256color" and "xterm" definitions before "ansi" and "dumb". As the majority of terminal emulators in common use are now more or less xterm-compatible (often even explicitly claiming the xterm-256color entry), this should often result in a fully or almost fully usable terminal (:issue:`9026`). - The history search text for a token search is now highlighted correctly if the line contains multiple instances of that text. - The new environment variable ``$fish_cursor_selection_mode`` can be used to configure whether the command line selection includes (``inclusive``) the character under the cursor or not (``exclusive``). The new default is ``exclusive``. Use ``set fish_cursor_selection_mode inclusive`` to get the previous behavior back (:issue:`7762`). +- process-exit and job-exit events are now generated for all background jobs, including those launched from event handlers (:issue:`9096`). New or improved bindings ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/checks/wait.fish b/tests/checks/wait.fish index 2337cacc4..db28c179f 100644 --- a/tests/checks/wait.fish +++ b/tests/checks/wait.fish @@ -56,3 +56,14 @@ end wait # CHECK: P1 over # CHECK: P2 over + +# Events for background jobs from event handlers (#9096) +function __test_background_job_exit_event --on-variable trigger_var + sleep .1 & + function callback --on-process-exit (jobs --last --pid) + echo -n "Callback called" + end +end +set trigger_var 123 +sleep .5 +# CHECK: Callback called