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
First of all, thank you very much for the library. It has already saved me a lot of time. Now my questions: I want to list the sources of all settings, similar to the output of git config --list --show-origin. Is there a way to iterate over all values in the figment? Also I'd like to be able to set config settings on different levels, much like --global and --local in git. What is the easiest way to do this, keeping the figment up-to-date at the same time? Ideally I'd want to be able to modify the value on the figment and serialize back to the source files depending on the location metadata.
The text was updated successfully, but these errors were encountered:
Hey! Sorry I didn't get to this until now. I must have missed it.
I want to list the sources of all settings, similar to the output of git config --list --show-origin. Is there a way to iterate over all values in the figment?
Yes. If you just want the sources, use get_metadata(). If you want all of the values in a Figment, use data() then use the tag() for each Value to look up its Metadata.
Also I'd like to be able to set config settings on different levels, much like --global and --local in git. What is the easiest way to do this, keeping the figment up-to-date at the same time?
I'm not sure I understand this question. Can you be a bit more specific? Perhaps with a concrete example?
Ideally I'd want to be able to modify the value on the figment and serialize back to the source files depending on the location metadata.
If you merge() or join() on an existing figment, then its data() will be updated. The return value from data() is Serialize, so you can use any format you want and write it to a file. You could also extract() into any Deserialize type that you want, which you could then write wherever you want.
First of all, thank you very much for the library. It has already saved me a lot of time. Now my questions: I want to list the sources of all settings, similar to the output of
git config --list --show-origin
. Is there a way to iterate over all values in the figment? Also I'd like to be able to set config settings on different levels, much like--global
and--local
in git. What is the easiest way to do this, keeping the figment up-to-date at the same time? Ideally I'd want to be able to modify the value on the figment and serialize back to the source files depending on the location metadata.The text was updated successfully, but these errors were encountered: