TEXT_PICKER Prompt the user to interactively enter text via the UI.

When to use it

Use TEXT_PICKER any time text is required, such as a host name or username.

Syntax

TEXT_PICKER [text prompt] [default text] 

text prompt required

Text prompt / dialog title shown to the user. Text prompts should be kept short enough to fit on the device display.

default text required

Default text when the picker launches. Must be an empty string ("") for a blank prompt.

The text picker dialog
The text picker dialog
The text picker editor
The text picker editor

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