-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Labels
Milestone
Description
Is your feature request related to a problem? Please describe.
I want to be able to perform operations other than overwriting a file or variable in local.toml
, for example appending certain text to it for machine-specific bashrc configuration for example.
Another use-case would be to specify the type of the file in global.toml
.
Describe the solution you'd like
[package.files]
my_file = {}
A file mapped to an object with some description of the action wanted.
An idea off the top of my head: {"action": "append", "text": "echo hello world!"}
Describe alternatives you've considered
The current workaround for this is to implement that behavior myself in the source file in an {{if}}
block and then toggle that on in the machine's local.toml
and off in all other local.toml
s.
- Update documentation when this is implemented
- Think about how merging two target objects should work
local.toml
will just overwrite the whole value currently. I thought about making it merge in certain cases (for example specifyingappend
in global andprepend
in local) but this seems like too narrow of a use-case to matter. - When this is done, open an issue for this to also work on folders (?)
I don't think this is important in folders, so I won't be doing this for now at least.