Skip to content
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

Distinction between Ctrl-C and exit 130 is gone #6822

soumya92 opened this issue Mar 28, 2020 · 1 comment

Distinction between Ctrl-C and exit 130 is gone #6822

soumya92 opened this issue Mar 28, 2020 · 1 comment


Copy link

fish, version 3.1.0-442-gdee2adf03

Prior to the fix for fish_postexec not being called on interrupt, I could set a flag in fish_preexec and clear it in fish_postexec. If I made it to fish_prompt with the flag set, I would know that the previous command was cancelled (rather than exit 130).

Now, with fish_postexec (correctly) being called even after a Ctrl-C, there's no way to distinguish something that exited with 130 on its own from something that was terminated by the user pressing Ctrl-C.

It would be nice if there was some way to do that. Would it be possible to add an event that triggers on Ctrl-C? (--on-signal INT doesn't work because the signal is sent to the foreground process, not fish).

I would have called such an event fish_cancel, but that name is already in use. fish_exec_cancel maybe?

Copy link

zanchey commented Apr 3, 2020

Fixed with the merge of #6824.

@zanchey zanchey closed this as completed Apr 3, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

Successfully merging a pull request may close this issue.

3 participants