lf
lf copied to clipboard
on-quit command is not run when terminal is closed
Due to this, some cleanup commands are not run.
I tried moving these lines https://github.com/gokcehan/lf/blob/36a7a18316580864f2f2ebd79e9ddae4858f6b60/app.go#L314-L316
into app.quit() method (because it is called on SIGHUP, SIGTERM and other signals) but it did not work to some reason.
I briefly tried moving that snippet into app.quit()
and it seemed to work. Can you double-check?
@kmarius You're right! I've never wrote Go and it turned out that I put the snippet inside a error handler by mistake. Now it does work. However, to some reason, on-quit
command gets executed 2 times instead of 1 (which might be undesirable in some cases). Is it because app.quit()
is called when the server terminates as well?