Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to append a previously defined value? #612

Closed
sahilseth opened this issue Apr 19, 2019 · 2 comments
Closed

Is it possible to append a previously defined value? #612

sahilseth opened this issue Apr 19, 2019 · 2 comments
Labels

Comments

@sahilseth
Copy link

It is possible to ask the final parser to pick up a previously defined value, and append to it?

[tool]
basepath = "~/apps/mytool"
binpath = "{basepath}/bin"

Finally, I expect the value tool.binpath='~/apps/mytool/bin'

I am using the rcpptoml parser, and not sure which is the best repo to raise this issue.
@eddelbuettel

Thanks for nice clean config lang!

@TheElectronWill
Copy link
Contributor

Unfortunately it's not possible in toml. You cannot reference another variable.

@pradyunsg
Copy link
Member

pradyunsg commented May 6, 2019

Hi @sahilseth! Thanks for filing this issue.

I don't think this is something we'd want to have in the TOML standard since this is something that can be implemented by tools that consume TOML, as additional behaviour of the tool. I understand that it might be a common use case, but the way to satisfy this would be to address it at the application level and not the TOML language level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants