1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 19:44:45 +00:00

add ability to template link value for #268

This commit is contained in:
deadc0de6
2020-10-11 21:10:06 +02:00
parent 057db9b536
commit 5c3944c828
5 changed files with 194 additions and 17 deletions

View File

@@ -556,7 +556,32 @@ profiles:
- f_somefile
```
Make sure to quote the path in the config file.
## Dynamic dotfile link value
Dotfile `link` value can be dynamically constructed using
define variables (([variables and dynvariables](config.md#variables)).
For example
```yaml
variables:
link_value: "nolink"
dotfiles:
f_test:
src: test
dst: ~/.test
link: "{{@@ link_value @@}}"
profiles:
linux:
dotfiles:
- f_test
variables:
link_value: "link"
windows:
dotfiles:
- f_test
```
Make sure to quote the link value in the config file.
## Dynamic actions

View File

@@ -73,6 +73,7 @@ Entry | Related doc
-------- | -------------
dotfile src | [dynamic dotfile paths](config-details.md#dynamic-dotfile-paths)
dotfile dst | [dynamic dotfile paths](config-details.md#dynamic-dotfile-paths)
dotfile link | [Dynamic dotfile link value](config-details.md#Dynamic-dotfile-link-value)
variables | [variables](config-details.md#entry-variables)
dynvariables | [dynvariables](config-details.md#entry-dynvariables)
actions | [dynamic actions](config-details.md#dynamic-actions)