1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-08 00:59:18 +00:00

doc action

This commit is contained in:
deadc0de6
2023-09-04 12:29:05 +02:00
parent dfb2641813
commit ca393e7708

View File

@@ -67,6 +67,10 @@ Variables ([config variables and dynvariables](config-file.md#variables)
and [template variables](../template/template-variables.md)) can be used
in actions for more advanced use-cases.
Actions accept arguments in the form `{<arg-num>}` which specifies which
argument to replace in the action.
For example
```yaml
dotfiles:
f_test:
@@ -88,8 +92,8 @@ actions:
log: "echo {0} >> {1}"
config:
default_actions:
- preaction '{{@@ _dotfile_key @@}} installed' "/tmp/log"
- log '{{@@ _dotfile_key @@}} installed' "/tmp/log"
...
```
Make sure to quote the actions using variables.
Make sure to quote the actions using variables.