gokcehan / lf

Terminal file manager
MIT License
7.79k stars 331 forks source link

Prevent infinite loop when using `on-quit` #1856

Closed joelim-work closed 5 days ago

joelim-work commented 5 days ago

To reproduce, use the following config, start lf and then close the terminal window:

cmd on-quit ${{
    notify-send foo
    sleep 1
}}

Because the terminal is already closed, running on-quit as a synchronous shell command will cause app.quit to be called again, forming an infinite loop.