<CHOICES>... List of choices to be loaded in the list. Example: val1 val2 OR 'Val 1''Val 2'
OPTIONS:
-d, --default <DEFAULT VALUE>... Sets default selected value/values in the list
-m, --message <MESSAGE> Message to be displayed to the user
-n, --name <NAME> Name of the checkbox prompt
Example:
response=ux prompt checkbox 'javascript''golang''rust' --message='What are your favourite languages?' --name='language'echo $response
Output:
golang
Confirm
Confirm presents a yes/no question to the user in the interface (i.e. terminal or slack).
-D, --date Only get a date, with no associated time
-h, --help Prints help information
-t, --time Only get a time, with no associated date
-V, --version Prints version information
OPTIONS:
-d, --default <DEFAULT VALUE> Sets default value for datetime. Formats: '2019-12-11T21:37:12-08:00' or '2019-12-11T13:39:37Z' --max <MAX> Sets maximum value for datetime. Formats: '2019-12-11T21:37:12-08:00' or '2019-12-11T13:39:37Z'-m, --message <MESSAGE> Message to be displayed to the user
--min <MIN> Sets minimum value for datetime. Formats: '2019-12-11T21:37:12-08:00' or '2019-12-11T13:39:37Z'-n, --name <NAME> Name of the datetime prompt
Example:
response=ux prompt datetime --message='Pick a date' --name='date' --min='2020-01-01T00:00:00-08:00'echo $response
Output:
2020-03-01T12:00:00-08:00
Editor
Editor presets a prompt requesting a multi-line response from the user. If used in a terminal interface, the nano editor will be presented.
-d, --default <DEFAULT> Sets initial value in the editor
-m, --message <MESSAGE> Message to be displayed to the user
-n, --name <NAME> Name of the editor prompt
Example:
response=ux prompt confirm --message='Please add a commit message' --name='commit'echo $response
Output:
[text entered in a terminal window]
Input
Input presents an input (single-line text) prompt in the interface (i.e. terminal or slack).
-d, --default <DEFAULT> Sets a default response
-m, --message <MESSAGE> Message to be displayed to the user
-n, --name <NAME> Name of the input prompt
Example:
response=ux prompt list 'javascript''golang''rust' --message='What is your favourite language?' --name='language'echo $response
Output:
golang
Number
Number presents a prompt for a numeric value in the interface (i.e. terminal or Slack).
USAGE:
ux prompt number [OPTIONS] --message <MESSAGE> --name <NAME>
OPTIONS:
-d, --default <DEFAULT VALUE> Default value for the number prompt
--max <MAX> The maximum acceptable value for the prompt (inclusive)-m, --message <MESSAGE> Message to be displayed to the user
--min <MIN> The minimum acceptable value for the prompt (inclusive)-n, --name <NAME> Name of the number prompt
Example:
response=ux prompt number --message='What is your favourite number?' --name='number'echo $response
Output:
3
Password
Password presents an input prompt for passwords in the interface (i.e. terminal or Slack).
The password can be entered by the user or selected from their team’s secret store. If the value is entered directly, it will be obscured on the screen.
For passwords, the name doubles as the default secret store key for the desired secret. If this key is present, it will be selected as the default option for the user.
-m, --message <MESSAGE> Message to be displayed to the user
-n, --name <NAME> Name of the password prompt. Used as a key to match the secret store [aliases: key]
Secret presents an input prompt for secrets in the interface (i.e. terminal or Slack).
The secret can be entered by the user or selected from their team’s secret store. The value will be displayed on the terminal/screen as it is entered for verification.
For secrets, the name doubles as the default secret store key for the desired secret. If this key is present, it will be selected as the default option for the user.
-m, --message <MESSAGE> Message to be displayed to the user
-n, --name <NAME> Name of the secret prompt. Used as a key to match the secret store [aliases: key]