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

Add the ability to set and unset environment variables #31

Closed
superatomic opened this issue Apr 6, 2022 · 2 comments · Fixed by #66
Closed

Add the ability to set and unset environment variables #31

superatomic opened this issue Apr 6, 2022 · 2 comments · Fixed by #66
Assignees
Labels
enhancement New feature or request feature Added functionality
Milestone

Comments

@superatomic
Copy link
Owner

Sometimes, all that matters is that a variable is set, and it doesn't matter what it is set to. In this can, this syntax can be used:

HOMEBREW_NO_ANALYTICS = true

This sets the HOMEBREW_NO_ANALYTICS to 1.

And to unset variables that are set, a variable can be set to false.

@superatomic superatomic added the enhancement New feature or request label Apr 6, 2022
@superatomic superatomic self-assigned this Apr 6, 2022
@superatomic superatomic added the feature Added functionality label Apr 10, 2022
@superatomic superatomic added this to the v0.5.0 milestone Apr 24, 2022
superatomic added a commit that referenced this issue Apr 24, 2022
As described in #31. This commit is feature incomplete.
superatomic added a commit that referenced this issue Apr 24, 2022
As described in #31. This commit is feature incomplete.
superatomic added a commit that referenced this issue Apr 24, 2022
As described in #31. This commit is feature incomplete.
@superatomic
Copy link
Owner Author

Setting variables with VAR_NAME = true has now been implemented. Now, the challenge is to implement unsetting them, because that uses a different syntax then for setting variables, and that syntax varies between different shells.

superatomic added a commit that referenced this issue Apr 28, 2022
Move shell script conversion to a separate file, `convert.rs`.
They were previously in `main.rs`. Additionally, implement unsetting
environment variables as described in #31.
Note: until rust-lang/rust-clippy#8271 is added
to Rust in 1.61, `#![allow(clippy::ptr_arg)]` has been added to the top
of the file.
@superatomic
Copy link
Owner Author

Unsetting variables is now finished, and now the code has test cases (one step closer to closing #65).
All that's left to do is to update the README.md to document the additions, and then we can merge the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature Added functionality
Projects
None yet
1 participant