1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-06 01:28:04 +00:00

update doc

This commit is contained in:
deadc0de6
2021-09-24 20:54:20 +02:00
parent e2e86d3a9d
commit 3b7d290f4a
5 changed files with 77 additions and 2 deletions

View File

@@ -43,3 +43,7 @@
## Symlink dotfiles
[Symlink dotfiles](symlink-dotfiles.md)
## Prompt user for variables
[Prompt user for variables](prompt-user-for-variables.md)

View File

@@ -0,0 +1,26 @@
# Prompt user for variables
With the use of [uservariables](config-details.md#entry-uservariables),
one can define specific variables that need to be initially filled in manually
by the user on first run.
The provided values are then automatically saved by dotdrop to `uservariables.yaml`,
which can be included in the main config as a file from which variables are imported
using [import_variables](config-details.md#entry-import_variables).
Let's say for example that you want to provide manually the email value
on new hosts you deploy your dotfiles to.
You'd add the following elements to your config:
```yaml
uservariables:
emailvar: "email"
config:
import_variables:
- uservariables.yaml:optional
```
On first run, the `emailvar` is prompted to the user and then saved
to `uservariables.yaml`. Since this file is imported, the value for
`emailvar` will automatically be filled in without prompting the
user on subsequent calls.