Open a warning dialog with a yes, no, and cancel button, returning 0, 1, or 2 respectively

kdialog

  • Show KDE dialog boxes from within shell scripts.
    More information: <https://develop.kde.org/deploy/kdialog/>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

kdialog --warningyesnocancel "{{message}}"

click the source code to copy install kdialog on any operating system with command-not-found.com