| 1 |
# Uservariables entry |
| 2 |
|
| 3 |
The **uservariables** entry (optional) contains a collection of variables |
| 4 |
whose values are queried from the user |
| 5 |
(See [User variables](config-variables.md)). |
| 6 |
|
| 7 |
```yaml |
| 8 |
uservariables: |
| 9 |
<variable-name>: <prompt> |
| 10 |
``` |
| 11 |
|
| 12 |
If you want to manually enter variables' values, you can use the |
| 13 |
`uservariables` entry. Each variable will be prompted to the user. |
| 14 |
|
| 15 |
For example: |
| 16 |
```yaml |
| 17 |
uservariables: |
| 18 |
emailvar: "email" |
| 19 |
``` |
| 20 |
|
| 21 |
will prompt the user to enter a value for the variable `emailvar`: |
| 22 |
``` |
| 23 |
Please provide the value for "email": |
| 24 |
``` |
| 25 |
|
| 26 |
And store the entered text as the value for the variable `email`. |
| 27 |
The variable can then be used as any other [variable](config-file.md#variables). |
| 28 |
|
| 29 |
`uservariables` are eventually saved to `uservariables.yaml` (relatively to the |
| 30 |
config file). |
| 31 |
This allows to use the following construct to prompt once for some specific variables and |
| 32 |
then store them in a file. You might also want to add `uservariables.yaml` to your `.gitignore`. |
| 33 |
```yaml |
| 34 |
uservariables: |
| 35 |
emailvar: "email" |
| 36 |
config: |
| 37 |
import_variables: |
| 38 |
- uservariables.yaml:optional |
| 39 |
``` |
| 40 |
|
| 41 |
For an example, see [prompt user for variables](../howto/prompt-user-for-variables.md). |