From 61509743670e41012af6960677ad02eaf1b68ad6 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Mon, 22 Aug 2022 21:26:38 +0200 Subject: [PATCH] documentation on enriched variables --- docs/templating.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/templating.md b/docs/templating.md index 4d147a1..e04d5c5 100644 --- a/docs/templating.md +++ b/docs/templating.md @@ -41,10 +41,22 @@ The following variables are available in templates: * `{{@@ _dotdrop_dotpath @@}}` contains the [dotpath](config-config.md) absolute path. * `{{@@ _dotdrop_cfgpath @@}}` contains the absolute path to the [config file](config-file.md). * `{{@@ _dotdrop_workdir @@}}` contains the [workdir](config-config.md) absolute path. +* The [enriched variables](#variables-enrichment) * Dotfile specific variables (see [Dotfile variables](#dotfile-variables)) * All defined config variables (see [Variables](config-file.md#variables)) * All defined config interpreted variables (see [Interpreted variables](config-dynvars.md#dynvariables-entry)) +## Variables enrichment + +The below variables are added to the available variables withins. If the variable +is already set by the user (through the config file for example), it will not be overwritten. + +* `os`: will contain the OS name as provided by +* `release`: will contain the OS release version as provided by +* `distro_id`: will contain the distribution ID as provided by +* `distro_version`: will contain the distribution version as provided by +* `distro_like`: will contain a space-separated list of distro IDs that are closely related to the current OS distro as provided by + ## Dotfile variables When a dotfile is handled by dotdrop, the following variables are also available for templating: