You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copying over the discussion points of env var expansion:
This feature is a bit more involved as there are more questions arising:
Do we only want variable substitution in filenames or elsewhere in the config?
Do we want to allow substition only within strings?
Do we want to first parse the TOML, then substitute what is appropriate or first substitute and then parse (which would allow to define TOML structures within env variables)?
I didn't see this issue before, but I think it should be closed as #1577 brings environment variable substitution in config file. Users can use something like "$HOME/.config/rustic/rustic.log", or even "${XDG_CONFIG_HOME:$HOME/.config}/rustic/rustic.log"
I agree with @rdelaage. With #1577, environment variable substitutions have been added allowing to use $HOME or ${HOME} in the config profiles. I don't see the need to substitute also ~.
Activity
aawsome commentedon Jan 11, 2024
As
~is IMO just a special case of variable substitution (here the env variable$HOME), I'm closing this as duplicate of #942simonsan commentedon Feb 9, 2024
Discovered this library lately: https://docs.rs/crate/shellexpand/3.1.0
Maybe worth another discussion, if we can implement it with that more easily?
Reopening for that discussion
simonsan commentedon Feb 9, 2024
Copying over the discussion points of env var expansion:
This feature is a bit more involved as there are more questions arising:
Originally posted by @aawsome in #942 (comment)
Dialga commentedon Sep 13, 2025
ditto, as a first time user, i am also affected by this.
my config has
repo = '~/repo'but instead./~/repois used.rdelaage commentedon Oct 10, 2025
I didn't see this issue before, but I think it should be closed as #1577 brings environment variable substitution in config file. Users can use something like "$HOME/.config/rustic/rustic.log", or even "${XDG_CONFIG_HOME:$HOME/.config}/rustic/rustic.log"
aawsome commentedon Oct 10, 2025
I agree with @rdelaage. With #1577, environment variable substitutions have been added allowing to use
$HOMEor${HOME}in the config profiles. I don't see the need to substitute also~.