|
|
|
|
|
by ilyt
1208 days ago
|
|
I wouldn't rely on env variables. I'd make a script that goes somewhat like script envname command
then just loads .env.envname before executing.For k8s work I just put some relevant variables in PS1 so it is always visible "where I am", with prompt looking like this for say "dev" env: [08:15:57] ^ [~]
k8s:dev -> ᛯ
As for tmux behaviour, it's honestly entirely understandable. tmux have no way of knowing the intent of the user; some people might want "clean" session with defaults of what server is running, other might want some env variables copied.I don't have that problem because I just have session being created in my WM autostart, and I just use that one session 99.99% of the time. And creating new ones usually is from tmux, not from some random shell window elsewhere |
|