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
cannot create INI / TOML file with sections #4334
Comments
The foo/bar = 123
[foo/bar]
meta:/type = short
[other/key]
meta:/type = string The example above is in
Yes, sudo kdb import "system:/sw/samba/#0/current" toml << HERE
[global]
workgroup=MYGROUP
HERE AFAIK In general, if you want a specific file structure in human-readable formats, you should write the config file manually and the use |
Thank you, @kodebach , your example works fine if I add quotes: elektra@d8942644af5b:~$ sudo kdb import "system:/test123" toml << HERE
[global]
workgroup = "MYGROUP"
HERE So I would not be able to import the default config of samba, but at least I would be able to write something samba should be able to read. I can also see, what I was missing: elektra@9b5f78d99e76:~$ sudo kdb mount /etc/samba/smb.conf system:/sw/samba/#0/current toml
elektra@9b5f78d99e76:~$ sudo kdb meta-set 'system:/sw/samba/#0/current/global' 'tomltype' 'simpletable'
elektra@9b5f78d99e76:~$ sudo kdb set system:/sw/samba/#0/current/global/workgroup MYGROUP
Create a new key system:/sw/samba/#0/current/global/workgroup with string "MYGROUP"
elektra@9b5f78d99e76:~$ cat /etc/samba/smb.conf
[global]
workgroup = "MYGROUP" So I have to add We should definitely add the word |
Yes, that's true TOML needs quotes around strings. In theory the plugin could be adapted to allow unquoted strings. But that 100% spec-conforming TOML, so it would need a config option.
That's a good point. TOML uses the term "table" for sections, so we should probably note that somewhere for people coming from INI. |
I mark this stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping by writing a message here or create a new issue with the remainder of this issue. |
I closed this now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue. |
Steps to Reproduce the Problem
I tried to do the example from VISION.md.
Seems like there was a correct INI-Plugin once, but INI now falls back to using the NI-Plugin.
So I checked the TOML Plugin:
Which also doesn't provide sections.
Expected Result
Sections :)
Actual Result
No sections :-(
System Information
Questions
The text was updated successfully, but these errors were encountered: