Vars icon indicating copy to clipboard operation
Vars copied to clipboard

Option to define loader to use

Open ashleyhood opened this issue 9 years ago • 4 comments

It would be helpful to define which loader to use on the config file in the options, as not all config files will have an extension.

For example, I don't added extensions to my ini files but would still like to load them using a standard library like Vars.

This may only be possible when a single config is loaded or that all configs being loaded will have to be of the same type.

ashleyhood avatar Apr 07 '16 09:04 ashleyhood

Happy to do this but what's the use case for this? Can't you just add a file extension?

m1 avatar Apr 07 '16 12:04 m1

I am writing a cli script and would like to get the distro version using /etc/os-release file.

ashleyhood avatar Apr 07 '16 12:04 ashleyhood

Okay I see, I'll see about doing this, it will be probably be a toggle in the options; something along the lines of default_parser

m1 avatar Apr 07 '16 12:04 m1

Can send a pull request if you want :ok_hand: :+1:

m1 avatar Apr 07 '16 12:04 m1