bahamas10 / hue-cli

A command line interface to phillips hue
http://bahamas10.github.com/hue-cli/
222 stars 24 forks source link

Allow specifying config file location as an argument #19

Closed aaronbieber closed 7 years ago

aaronbieber commented 7 years ago

It would be nice to be able to specify the config file as a command line switch for, e.g., running this program in batch mode where $HOME may not point to the right place. In my case, I have some stuff running as another user that wants to run scripts using this client directly, but may not have $HOME configured in the non-interactive shell, or $HOME may point elsewhere than my user's home directory.

I am happy to submit a pull request for this functionality if it gets a couple +1s, but wanted to toss it in as an issue in case there are imminent plans to do this or strong reasons not to.

I envision something like -c / --config, which simply accepts a path to the file. We would have to reverse the order of argument parsing and config file loading in the script but that should be a trivial change.

bahamas10 commented 7 years ago

Ty for the PR... i've added a comment to it. I'm in the process of cleaning up hue-cli now so I will implement this feature as well.