Skip to content

Latest commit

 

History

History
67 lines (53 loc) · 2.52 KB

githooks-dialog_options.md

File metadata and controls

67 lines (53 loc) · 2.52 KB

githooks-dialog options

Shows a options selection dialog.

Synopsis

Shows a list selection dialog similar to zenity.

Extra buttons are only supported on Unix and Windows. If not using --multiple you can also use the button style options with --style 1 which uses buttons instead of a listbox.

Exit Codes:

  • 0 : Ok was pressed. The output contains the indices of the selected items separated by --separator.
  • 1 : Cancel was pressed or the dialog was closed.
  • 2 : The user pressed an extra button. The output contains the index of that button on the first line.
  • 5 : The dialog was closed due to timeout.
githooks-dialog options

Options

      --timeout uint               Timeout for the dialog
      --separator string           Selection indices separator to use for output, default is ','
      --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.
      --option stringArray         List of options to choose from.
      --default-option []uint      Default selected option indices (only macOS/Windows).
      --style uint                 Dialog style: `0` for list, `1` for buttons (only if not `--multiple`).
                                   For button style: Default is always either `--default-option` or
                                   the first `--option`.
      --multiple                   Allow multiple selections.
  -h, --help                       help for options

Options inherited from parent commands

      --json   Report the result as a JSON object on stdout.
               Exit code:
               	- `0` for success, and
               	- '> 0' if creating the dialog failed.

SEE ALSO

Auto generated by spf13/cobra