Shows a message dialog.
Shows a message dialog similar to zenity
.
Currently only one extra button is supported on all platforms. Only Unix
supports multiple extra buttons. Use options
to have more choices.
0
: User pressedOk
.1
: User pressedCancel
or closed the dialog.2
: The user pressed an extra button. The output contains the index of that button.
githooks-dialog message
--timeout uint Timeout for the dialog
--title string Dialog title.
--width uint Dialog width.
--height uint Dialog height.
--window-icon DialogIcon Window icon.
One of [`info`, `warning`, `error`, `question`] (only Windows/Unix)
--text string General text of the dialog.
--no-wrap Don't wrap the text.
--ellipsize Ellipsize the text if it doesn't fit.
--ok-label string Ok button label.
--cancel-label string Cancel button label.
--default-cancel Set `Cancel` as the default button.
--extra-button stringArray Extra buttons labels.
On macOS/Windows only one extra button is allowed.
--style MessageStyle Message style.
--icon DialogIcon Message icon.
One of [`info`, `warning`, `error`, `question`]
-h, --help help for message
--json Report the result as a JSON object on stdout.
Exit code:
- `0` for success, and
- '> 0' if creating the dialog failed.
- githooks-dialog - Githooks dialog application similar to
zenity
.