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

asdf shell --unset to unset all plugin shell versions #1619

Open
zachallaun opened this issue Aug 13, 2023 · 3 comments · May be fixed by #1632
Open

asdf shell --unset to unset all plugin shell versions #1619

zachallaun opened this issue Aug 13, 2023 · 3 comments · May be fixed by #1632

Comments

@zachallaun
Copy link

Is your feature request related to a problem? Please describe

I work on projects that work with multiple versions of multiple packages managed by asdf. Generally, these projects have a .tool-versions that sets the "canonical" version for the project, but I will frequently use asdf shell <plugin> <version> to override the version for a time.

Going back to the .tool-versions or global defaults requires running asdf shell <plugin> --unset for each plugin I've set, usually followed by asdf current to ensure that everything's been reset.

Describe the proposed solution

asdf shell <plugin> --unset unsets the env var override for an individual plugin; I propose adding asdf shell --unset to unset any env vars that have been set with asdf shell.

Describe similar asdf features and why they are not sufficient

asdf shell <plugin> --unset will unset an individual plugin but requires both typing the plugin name and running the command multiple times for each plugin you wish to unset.

Describe other workarounds you've considered

Beyond parsing the output of asdf current and running --unset on each plugin, I am not sure of a reasonable alternative.

@edvardsanta
Copy link
Contributor

i like ur idea, but i think it would be better with param "--unset-all"

@edvardsanta
Copy link
Contributor

what do u think?

unset.mp4

@zachallaun
Copy link
Author

Nice! I love the visibility it gives to what was unset as well. Nice job.

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

Successfully merging a pull request may close this issue.

2 participants