Why does Ctrl-C not terminate the app when the form is used as as a BubbleTea model #273
-
I was experimenting with the
when I press Ctrl-C I get a blank screen, and when I switch to a different terminal, I see that However, Ctrl-C works as expected and the app quits when I do the following (instead of the above):
What is the difference between these two modes of execution? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, this is intentional as when running the form in bubble tea you may not want to quit the app if the user presses ctrl+c, when running the form in stand alone mode however you would want to cancel the form. This is controlled here: https://github.com/charmbracelet/huh/blob/main/form.go#L558-L561 |
Beta Was this translation helpful? Give feedback.
-
Hum, thanks! That makes sense though I'd humbly suggest that could be better documented somewhere. |
Beta Was this translation helpful? Give feedback.
Hi, this is intentional as when running the form in bubble tea you may not want to quit the app if the user presses ctrl+c, when running the form in stand alone mode however you would want to cancel the form. This is controlled here:
https://github.com/charmbracelet/huh/blob/main/form.go#L558-L561