crudini
crudini copied to clipboard
Support leading whitespace
Is there a reason not to support leading whitespace? E.g.
[SectionA]
key1 = value1
key2 = value2
crudini points parsing errors:
dmelo@merov2:~$ crudini --get a.ini SectionA key1
File contains parsing errors: <???>
[line 2]: key1 = value1
[line 3]: key2 = value2
Unfortunately "standard" ini file format treats leading whitespace specially, as it's used to create multiline values, hence the iniparse library that crudini uses is giving an error.
I see indented values used in .gitconfig for example.
Related to this is supporting indented [section headers] as is used in: http://hekad.readthedocs.org/en/latest/getting_started.html#heka-dashboard
We would need to enhance iniparse to support this as an option.