SuperCuber / dotter

A dotfile manager and templater written in rust 🦀
The Unlicense
901 stars 48 forks source link

Expand variables in target paths #190

Open balthild opened 3 weeks ago

balthild commented 3 weeks ago

Closes #61

Design considerations

Currently I just mix the config variables and environment variables together. For example:

[vars.variables]
config = "~/.config"

[cat]
depends = ['vars']

[cat.variables]
cat_name = 'QuarticCat'

[cat.files]
cat = '$config/$cat_name'

config="~/config_dir_from_env" dotter deploy will results in cat being ~/.config/QuarticCat rather than ~/config_dir_from_env/QuarticCat.

What do you think? Is this behavior good or it's better to separate them (e.g. config.var_in_config vs. ENV_VARS)?