-
I have two different sets of ENV variables for home projects and for work. Right now env variables are stored in files that I manually source when needed. home.env: export NOMAD_ADDR="https://nomad.service.consul:4646"
export VAULT_ADDR="https://vault.service.consul:8200"
export SOME_SECRET="secret"
... work.env: export NOMAD_ADDR="https://nomad.example.com"
export VAULT_ADDR="https://vault.example.com"
export CLOUDFLARE_API_KEY="secret"
.... If would be awesome if I could source those files per session or specify env variables in smug config file. I've tried with I can source files with ...
windows:
- name: home
commands:
- source home.env
- clear
... But I will have to specify it for every window. If there was a way to set variables per session, like this, for example: session: home
root: ~/
env:
ENV: home
FOO: bar
... Then I could use bashrc to source files depending on case $ENV in
home) source home.env ;;
work) source work.env ;;
*)
esac |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Right now the only way to source env variables is via |
Beta Was this translation helpful? Give feedback.
-
Setting environment variables is available in v0.2.4 now. session: home
root: ~/
env:
ENV: home
FOO: bar |
Beta Was this translation helpful? Give feedback.
Setting environment variables is available in v0.2.4 now.