-
Notifications
You must be signed in to change notification settings - Fork 104
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
feat: ctrl-c to quit the app #297
base: master
Are you sure you want to change the base?
Conversation
Now ctrl-c will exit the app, bypassing any bindings.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #297 +/- ##
==========================================
+ Coverage 88.40% 88.41% +0.01%
==========================================
Files 62 62
Lines 5578 5583 +5
==========================================
+ Hits 4931 4936 +5
Misses 647 647 ☔ View full report in Codecov by Sentry. |
Hi! This is great :) I wonder if someone would ever want this to be configurable. 🤔 Perhaps it wouldn't hurt, what do you think? In the case, I believe there's a module "config.rs", as well as a "default_config.toml", where other stuff is configured. Currently on vacation so could include it in a release when I'm back home (February). |
Unlikely (?). Now that I gave this a second though, I think that the initial implementation I made is a bit naive. It wouldn't work if for some reason A better way would be to react on signals. So in the case of |
Probably should happen somewhere around here. If we receive the |
Yea that'd make sense :) If there's a pending external command running, perhaps the signal should be propagated to it. I can't recall if Ctrl-C produces a signal when terminal raw-mode is enabled, might be a gotcha. |
Resolves #258.
Firstly, thanks for this - I love magit and command line, so this feels like a perfect tool for me. As a thank you, I figured I will contribute a small ticket for you.
Now
ctrl-c
will exit the app bypassing any default or custom bindings. If you want to tweak the logic (for example exit only when the amount of screens is 1 i.e. root-level) - add more conditions tois_system_quit
function.