script-dialog
script-dialog copied to clipboard
Improve cancelability
Only the base text interface, maybe TUIs are cancelable due to the CTRL+C / CTRL+Z shortcuts. Should add cancel buttons and let the script kill itself.
Seems like all dialogs return "1" on any "Cancel" button options. Dialog & whiptail have escape key return values, DIALOG_ESC (default 255) and -1 respectively.
An empty response can be used to detect cancel for radio options (but not checkbox options). Zenity seems to have a "kill parent on cancel" for progressbars, but this may not be helpful. Maybe create a progress cancel file/sink?