aconfig icon indicating copy to clipboard operation
aconfig copied to clipboard

feature: show environment variable names in usage

Open voxeljorge opened this issue 2 years ago • 2 comments

It would be handy to have some way to print environment variable names either in the -h usage or from some other help flag. This would help make it more obvious to someone running an application configured by aconfig what their config options are.

voxeljorge avatar Sep 30 '22 14:09 voxeljorge

Hi, sounds useful. Any idea for the api?

Currently we have Walk method to iterate over all fields. Probably it should be replaced with something userfriendly or...I don't know.

cristaloleg avatar Sep 30 '22 15:09 cristaloleg

Walk is useful for sure and enables someone to implement this themselves if necessary. I'm not sure what the best API would be, maybe an EnvUsage bool flag in the loader config? That flag could trigger environment usage information to get added to the usage printed via -h

voxeljorge avatar Sep 30 '22 15:09 voxeljorge