tui.confirm
tui.confirm MESSAGE [ON_YES [ON_NO]] [flags]
Shows a Yes/No dialog and returns immediately; the callback runs after the user answers.
Parameters
ON_YES,ON_NO: commands: a function name plus fixed arguments, split on spaces. Either may be empty.
Options
--danger: red primary button, titleWarning, and No selected by default.--default yes|no,--title T,--width N,--yes LABEL,--no LABEL.
Notes
- Keys:
yyes,nor Esc no, arrows/Tab move, Enter picks. Mouse clicks work. - The callback runs after the dialog is closed and the screen repainted, so it may open another dialog or change page.
TUI_DIALOG_RESULTisyesorno. - Commands can’t chain with
;or quote arguments, and must be shell functions. Pass values with spaces through a variable. - Does nothing before the app runs.
Example
tui.confirm "Delete report.csv?" "rm_file report.csv" --danger --yes Delete --no Keep
