-
-
Notifications
You must be signed in to change notification settings - Fork 20
Add --envs option to export #42
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
Conversation
to export only given environment variables
Alongside passing environment variables through the command line, if the user leaves the `--envs` key empty, `envio` will then provide the user with a multi-select prompt for them to select the environment variables they wish to export.
There was a bug in the filtering condition. Instead of `.filter(|item| !envs.contains(item))` it has to be `.filter(|item| envs.contains(item))`
|
This is a great idea @afh. There wasn't any issue with the code except a very small bug in the filtering condition in the Alongside your current implementation, I also added a feature where if the user leaves the Also I haven't used the Thank you for the pull request! Appreciate it |
|
Glad to hear that you like the idea, @humblepenguinn. Thank you for addressing the issues and improving this PR, much appreciated! I like what you have done, so that users are able to select the variables to export. Here are two more things that I think could improve the change:
From my understanding and use a flake is a file that describes in a stand-alone manner all the dependencies and commands necessary to build a certain software. A flake can have multiple outputs (think installable program, documentation, and accompanying static website). And flakes pin the versions for the source and its dependencies, so that it becomes universally reproducible. Hope this helps and my understanding isn't too far from the reality ;) |
|
Thank you for your suggestions, @afh they sound pretty good. I am a bit unsure about the VI key bindings, though. That would be a feature that Vim/Neovim users would appreciate but might not appeal to everyone. Perhaps we could add another flag or create a configuration file that If we decide to create a config file, then having just one singular key won't look good. We would need to implement configuration for a lot more stuff. Do you have any ideas as to what we can add? I've been thinking about implementing this for some time, so this sounds like a good excuse to do so. The concept of a flake sounds pretty cool. I took a look at the Do you think a |
|
Thanks for merging this already, @humblepenguinn, much appreciated! Is it possible to have multiple key bindings at the same time, so that the cursor keys and vi-keys and CTRL-n and CTRL-p all work, regardless of user preference? Personally I'd like to avoid config files for as long as possible and currently to not see the need for this project. That said I've only scratched the surface of envio. What other uses than keybindings to you see for an envio config file? I highly recommend nixpkgs! And learning it can be quite the struggle. Happy to help or answer question as these always provide a good opportunity to learn. I don't think adding a Yes, a flake is something that requires nix. I'm looking into adding a Hope this helps :) |
|
Apologies for having accidentally added the |
|
Thank you for the contribution @afh! Currently I agree, a configuration file for envio seems a bit early. There are a few places where we could add some sort of configuration but I don't think it would be something user's would be interested in. So that is something we can take a look at some other time. Adding a |
It was something I wanted to add but after taking a look at the file my gut feeling was that it wasn't cross platform, so I decided to omit it for now. |
to export only given environment variables.
What are your thoughts on this, @humblepenguinn?
Do you think this is a useful addition or does it make envio interface too complicated?
I think this can be quite useful. Personally I'm not using profiles as much, but want to be able to export only certain variables to and
.envfile for testing.Not sure if my approach is very rusty or elegant, looking forward to your feedback 🙂