From 0f1d9f1ecca21667256f287859e75cd901e0073c Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Sun, 8 Nov 2020 13:10:31 +0100 Subject: [PATCH] update variables rules doc --- docs/config-details.md | 4 ++-- docs/config.md | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/config-details.md b/docs/config-details.md index 6903df1..ce26260 100644 --- a/docs/config-details.md +++ b/docs/config-details.md @@ -448,8 +448,8 @@ actions: dateme: date > /tmp/timestamp ``` -External variables will take precedence over variables defined within -the source config file. +External/imported variables will take precedence over variables defined +inside the main config file. Dotdrop will fail if an imported path points to a non-existing file. It is possible to make non-existing paths not fatal by appending the path with `:optional` diff --git a/docs/config.md b/docs/config.md index f34e9ab..46b7a0f 100644 --- a/docs/config.md +++ b/docs/config.md @@ -53,6 +53,11 @@ Here are some rules on the use of variables in configs: [variables](config-details.md#entry-variables) are templated before [interpreted variables](config-details.md#entry-dynvariables) are executed * config files do not have access to variables defined above in the import tree +* `dynvariables` take precedence over `variables` +* profile `(dyn)variables` take precedence over any other `(dyn)variables` +* profile `(dyn)variables` take precedence over profile's included `(dyn)variables` +* external/imported `(dyn)variables` take precedence over + `(dyn)variables` defined inside the main config file ## Symlink dotfiles