knqyf263 / pet

Simple command-line snippet manager
MIT License
4.44k stars 223 forks source link

Added environment management capabilities #204

Closed RamiAwar closed 2 years ago

RamiAwar commented 2 years ago

This PR adds some environment variable management capabilities to pet. Does this by saving env vars in "snippets" that have a tag of [[env]] (piggybacking on the sync), and activating environments by spawning a new shell with those env vars set up there (activate command).

Not sure if this is a change that is wanted in Pet, but I'll be adding this functionality to my company's pet users since its something we really want.

Still missing add command but will do that soon.

Just submitting this to see if anyone is interested in adding such functionality to pet.

RamiAwar commented 2 years ago

Saving overwrites env vars. Need to fix that first.