-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Labels
Description
Is your feature request related to a problem? Please describe.
I'd like to use variables in dotter's config files themselves. Something like:
[variables]
config_dir = "~/.config"
[shell.files]
"zsh/zprofile" = "~/.zprofile"
"zsh/zshrc" = "{{config_dir}}/zsh/zshrc"
"gitconfig" = "{{config_dir}}/git/config"and then in ~/.zprofile too:
XDG_CONFIG_HOME="{{config_dir}}"Describe the solution you'd like
Maybe parse the variables first, then render a handlebars template for each path. Or is that overkill?
Alternatively, maybe new values can be added to shellexpand, to be substituted like env vars ($config_dir/zsh/zshrc). Might need changes upstream. I think shellexpand::env_with_context could be used for this.
Describe alternatives you've considered
Run dotter with variables set on the shell for shellexpand to use:
env XDG_CONFIG_HOME="~/.config" dotter deployruniq, younger-1, lo48576, Amir-Ahmad, murkylife and 5 more