status-im / nim-confutils

Simplified handling of command line options and config files
Apache License 2.0
63 stars 16 forks source link

fix: proper env variable naming #69

Open AuHau opened 1 year ago

AuHau commented 1 year ago

This fixes the way how the env. variables names are defined from the parameter names. Especially it follows the convention of using solely uppercase letters, digits, and the '_' (underscore) as specified in IEEE spec.

While the env. variables are currently not wired to be used automatically if somebody used the Envvar manually, then for them merging this PR would be breaking change, yet IMHO, the current implementation is broken and not possible to use as, for example, my shell (fish) does not even allow me to define env. variable with names containing -.

Btw. I am Nim novice so if you have some code improvement suggestions, please let me know ;-)

Closes #68 Closes #21

zah commented 1 year ago

I welcome this addition, but can you please document this behavior in the README? You can also include a link the IEEE spec in the code.

AuHau commented 1 year ago

Will do! Actually found a bug in this PR, so will fix that and adjust the Readme 👍

AuHau commented 1 year ago

@zah done ;-)

I have also taken the liberty to adjust the README a bit to communicate the library's current capabilities better.