5 ms·
It can if you are executing programs that then try to execute those commands and get your commands instead.
by Taywee 4y ago
It can if you are executing programs that then try to execute those commands and get your commands instead.
- nerdponx 4y agoI wish it was easier to create "snapshots" of a particular set of environment variables in order to use them later as run environments. I also wish that Unix desktop environments generally made it easier to manage env vars, but that's another complaint. And don't get me started on PAM env vars...
- OJFord 4y agoJust env vars? env > "$(date +s).env-snapshot" (And use it again slightly more awkwardly as <$file | xargs -I@ echo '"@"' | tr '\n' ' ' | xargs -I@ env @ cmd or something more convenient to `cmd`.)
- fragmede 4y agohttps://direnv.net/ https://direnv.net/
- nerdponx 4y agoI use Direnv in all of my projects, but it doesn't make it any easier to manage consistent groups of env vars or assign different executables to run in different groups.
- verrp 4y ago> I wish it was easier to create "snapshots" of a particular set of environment variables in order to use them later as run environments. docker gives you this (but only as part of a whole ecosystem, which for various reasons you might not want to hitch your horse to).
- LanternLight83 4y agoDirenv has been mentioned, and it meshes well with functional package managers like Nix and Guix, each of which include the concept of "Profiles". Each profile can access a specific set of programs via it's environment, but PATH is far from the last variable that you can use Direnv or Profiles to control.