hyperupcall / autoenv

Directory-based environments.
MIT License
5.72k stars 261 forks source link

Cache and revert #208

Closed alissa-huskey closed 1 year ago

alissa-huskey commented 2 years ago

This patch provides a autoenv_cache function that can be used to cache variables in .env files when leaving is enabled. These are then reverted in autoenv_leave().

hyperupcall commented 2 years ago

Oooh, this looks useful ^w^, it seems to address some ideas in #19. Before I merge this I wanna get #205 merged, so tests can be added for this behavior

hyperupcall commented 1 year ago

While this is a useful feature for some people, I'm closing this because I think the addition would make the project more complex than what is necessary. There are other softwares that do better unloading and those can be used instead. This code is written to be simple and clear, so many features will be left-out.