On this page
article
TEXT_PICKER
TEXT_PICKER - Ask the user to interactively enter text via the UI
When to use it
Any time text is required - such as a host name or user name.
Syntax
TEXT_PICKER [text prompt] [default text]
text prompt
Prompt to show the user. Prompts should be kept short enough to fit on the device display.
default text
Default value to populate the picker.
The text picker dialog
The text picker editor
Default text should typically be provided. To prompt the user with no default, use a blank quoted string: "".
Results
TEXT_PICKER will wait until the user has made a selection, pausing the payload.
TEXT_PICKER exits with a return code of 0 if the user continues, and non-zero if the user cancels.
TEXT_PICKER returns the text as the output.
Examples
__host=$(TEXT_PICKER "Target hostname" "foo-client") || exit 0
__demo=$(TEXT_PICKER "No default text" "") || exit 0
Remember to enclose the prompt text in quotes!