Shows a file selection dialog.
Shows a file selection dialog similar to zenity
.
0
: User pressedOk
. The output contains the selected paths separated by--separator
. All paths use forward slashes on any platform.1
: User pressedCancel
or closed the dialog.5
: The dialog was closed due to timeout.
githooks-dialog file-selection
--timeout uint Timeout for the dialog
--separator string Path separator to use for output. (default "\x00")
--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)
--root string Default root path of the file dialog. (default ".")
--filename string Default filename in the dialog.
--file-filter []FileFilter Sets a filename filter (`<name> | <pattern> <pattern> ...`). (default &[])
--show-hidden Show hidden files.
--directory Activate directory-only selection.
--multiple Allow multiple selection.
-h, --help help for file-selection
--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
.