-
Notifications
You must be signed in to change notification settings - Fork 57
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
feature request, allow special characters for section and var names #2
Comments
sorry , i use ./read_ini.sh to run it instead of .read_ini , and i cant close this issue. |
Allowing such special characters is not easy possible because read_ini's interface wants to use these strings as bash variables. $ cat /tmp/bla.ini $ read_ini /tmp/bla.ini hope that helps, |
Forgot to note, you need to declare $INI before calling read_ini: see also the examples in the test directory. |
Thank your for reminding :P , i will try to use it . |
Would it perhaps be an option to be less strict when reading the sections and values, and just convert special characters to underscore before creating the variables? This is already being done for '.' correct? |
I switched to using the 'next' branch which supports special characters in the section names. However I came across a complex example in one of the configuration files that I am parsing that is still not handled as expected:
In this example, each line is handled as a separate parameter value pair instead of forming part of directories. The script also fails on Folders local:directory:, expecting an '=' at the end. Any ideas on how to deal with the above? |
I've created pull request #9 to add support for multiline values, and added a few other features similar to what can be found in Python's All of the tests still run and I've added a few new ones. @rudimeier will you please review? |
subject changed by Rudi to match the feature request of post #2
The text was updated successfully, but these errors were encountered: