script-dialog icon indicating copy to clipboard operation
script-dialog copied to clipboard

Improve cancelability

Open lunarcloud opened this issue 8 years ago • 1 comments

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.

lunarcloud avatar May 24 '17 20:05 lunarcloud

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?

lunarcloud avatar Jun 10 '24 13:06 lunarcloud