Skip to content
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

Support environment variables #7

Closed
mfn opened this issue Dec 9, 2016 · 2 comments
Closed

Support environment variables #7

mfn opened this issue Dec 9, 2016 · 2 comments

Comments

@mfn
Copy link

mfn commented Dec 9, 2016

Since providing an index and an analyzer is required, it would be nice to support environment variables so there can be set some defaults to the current shell environment.

Some suggestions:

  • ELYZER_ROOT_URL=http://server/9123 => same as --es http://server/9123
  • ELYZER_INDEX=myIndex => same as --index myIndex
  • ELYZER_ANALYZER=myAnalyzer => same as --analyzer myAnalzer`

The environment variables would be the fallback if the appropriate argument is not passed to elyzer. I.e. command line arguments "always win".

Together with #6 this would make a good fit to make this a quick and handy tool:

export ELYZER_ROOT_URL=http://server:9123
export ELYZER_INDEX=myIndex
export ELYZER_ANALYZER=myAnalyzer
$ elyzer analyze this text for me thank you
@softwaredoug
Copy link
Contributor

Great.

Totally would love to see this. Don't have time now, but I'm very open to a pull request for these 2 issues.

softwaredoug added a commit that referenced this issue Apr 8, 2017
@softwaredoug
Copy link
Contributor

Fixed in #10. Released in v1.0.0. Let me know if you run into any probs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants