4 ms·
> When I start a program in a shell, I expect it to inherit the environment of that shell. That's exactly how tmux works. You start a server, it inherits the
by cauthon 4y ago
> When I start a program in a shell, I expect it to inherit the environment of that shell.
That's exactly how tmux works. You start a server, it inherits the environment of the current shell. You create a new session in that server, it inherits the environment of the server.
I don't understand how forcing tmux to re-load the current local environment for each new shell is saner behavior. One natural consequence would be that new panes in existing sessions are also created with the new env vars, which is obviously undesirable.
- mananaysiempre 4y ago>> When I start a program in a shell, I expect it to inherit the environment of that shell. > That's exactly how tmux works. You start a server, it inherits the environment of the current shell. You create a new session in that server, it inherits the environment of the server. Whether that makes sense depends on if your mental model has starting a server and connecting to a server to create a new shell as distinct actions, as opposed to a singular action of connecting to a conceptually always-present persistent environment and starting a shell there. Admittedly tmux’s interface is mostly organized along the former lines, but given I prefer `tmux new -A`, my own model seems to follow the latter.