一个 Windows, Darwin 版本的 env 命令,类似 cross-env。
go install github.com/hellojukay/env@latest
- Show the environment:
env
- Clear the environment and run a program:
env -i program
- Remove variable from the environment and run a program:
env -u variable program
- Set multiple variables and run a program:
env variable1=value variable2=value variable3=value program