-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fish_exit
doesn't fire when terminal window is closed
#7014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
fish_exit
doesn't fire when Terminal window is closedfish_exit
doesn't fire when terminal window is closed
What exactly are you doing? What function are you using? E.g. if I do function idea --on-event fish_exit
date >> /tmp/idied
end that leaves a timestamp in the file /tmp/idied in my tests. This is on linux, so it's possible there's some macOS weirdness. |
The event doesn't work for me on macOS or Linux when fish receives the SIGHUP signal, such as by |
@faho thank you for your answer! It does not seem to be related to a particular function I'm using because your example doesn't work for me either. |
This comment has been minimized.
This comment has been minimized.
When SIGHUP is encountered, a flag is set to end the read loop ( |
Function defined as
doesn't fire when Terminal.app (or iTerm) window is closed on macOS.
Is this expected behavior? If so, how can I fire
my_function
when the terminal window is closed?I've also tried:
--on-process-exit $fish_pid
--on-signal SIGTERM
--on-signal SIGKILL
No success.
P.S.
my_function
is fired after executingexit
command in the terminal window, but I need to be able to run it when the window is closed too.The text was updated successfully, but these errors were encountered: