-
Notifications
You must be signed in to change notification settings - Fork 330
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
Export options as environment variables #448
Conversation
Any options from gOpts are available via lf_OPTION environment variables. For now it works only on booleans, integers and strings (no array support)
@YerinAlexey Thanks for the patch. I never considered using Is it possible to also add I see you also you
What do you think? |
Yes, I'll add it.
I also think |
@YerinAlexey Since |
Thanks for advice, I didn't know about this function before |
@YerinAlexey It seems good to me. Thank you again for implementing this. |
Thank you so much for implementing this! It works perfectly!
Hey, I don't actually like this idea at all because it encourages the execution of arbitrary variables. Having a stricter (although more verbose) representation of the variables sounds like a more secure approach. Besides, it makes it a bit more consistent with non-boolean variables: You'd have to Note: Currently, doing |
@SeerLite You have a point, though I can't think of any scenario where the values can be set to arbitrary commands to be executed which is otherwise not possible. I can see how some people may try to accidentally execute non-boolean variables (e.g. Anyway, |
Currently, me neither. But that doesn't mean that something like this can't come up in the future!
I'm assuming POSIX shell for this, and I think
I tested this and as long as there's a |
Fix colour construction issue This also has a test to mitigate it in the future Remove `colormode` option The original issue it was trying to solve is no longer present with tcell (it being a holdover from `color256` on termbox) so it is not needed. retire gitter channel in favor of irc/matrix Export options as environment variables (gokcehan#448) * Export options as environment variables Any options from gOpts are available via lf_OPTION environment variables. For now it works only on booleans, integers and strings (no array support) * Do not export some of the options * Add support for arrays and fix numbers * Fix comments * Replace 1 and 0 with true and false * Export hidden,reverse,dirfirst and sortby options * Fix comments * Little fix * Simplify boolean conversion log readlink errors instead of fail Related gokcehan#447 and gokcehan#374
Fix colour construction issue This also has a test to mitigate it in the future Remove `colormode` option The original issue it was trying to solve is no longer present with tcell (it being a holdover from `color256` on termbox) so it is not needed. retire gitter channel in favor of irc/matrix Export options as environment variables (#448) * Export options as environment variables Any options from gOpts are available via lf_OPTION environment variables. For now it works only on booleans, integers and strings (no array support) * Do not export some of the options * Add support for arrays and fix numbers * Fix comments * Replace 1 and 0 with true and false * Export hidden,reverse,dirfirst and sortby options * Fix comments * Little fix * Simplify boolean conversion log readlink errors instead of fail Related #447 and #374
All options will be available in commands via
lf_OPTION
environment variablesCloses #443, closes #376