Thanks for the answers Nicholas! Perhaps I should just state what I currently do and see if there is a more optimal way of achieving what I think I want.
Right now for all of my computers I have tmux spawn when a shell is exec'ed. It is very nice to always have tmux running whenever I am in a shell and to not have to type: "tmux". The problem is when I ssh to other systems I then have two tmuxes running and I'd rather just have the one running on the remote system - so when I split a pane, I am doing all of my tmux commands on the "most remote" system and not have "more local" tmuxes interfere with the escape keys and not have to remember how many times I need to hit the escape sequence to get it to reach the "most remote" system. For instance: laptop (tmux) $ ssh workstation laptop (tmux) workstation (tmux) $ ssh home_server laptop (tmux) workstation (tmux) home_server (tmux) $ So that is three tmuxes I have running when really I just want: laptop workstation home_server (tmux) $ Or I would like my escape key binding to (default to?) send 3 escape keys if I have three tmuxes running. Any ideas or suggestions regarding my scenarios? Thanks! -m On Wed, Oct 2, 2019 at 2:46 PM Nicholas Marriott < [email protected]> wrote: > Hi > > tmux can't change the environment of other processes, including its > parent. > > You could possibly do it yourself with a script that detaches tmux, > usese tmux showenv and pane_current_path to update the parent shell, > then kills tmux. > > Alternatively it would possible to add a feature where tmux replaced > itself with a new shell with the updated environment but I don't see > much use for this so there is little chance of it being implemented. > > > On Wed, Oct 02, 2019 at 10:09:23AM -0500, Matt Zagrabelny wrote: > > Greetings, > > Is there a way to leave tmux, but somehow seed the environment > (history, > > CWD, etc.) with everything that was part of the tmux environment? > > Sort of like: > > tmux > > # do stuff > > tmux --copy-environment-exec-shell > > # now the shell is running without tmux > > What do you folks think? > > Thanks for any help! > > -m > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "tmux-users" group. > > To unsubscribe from this group and stop receiving emails from it, > send an > > email to [email protected]. > > To view this discussion on the web, visit > > > https://groups.google.com/d/msgid/tmux-users/CAOLfK3V%2BVMY4br1fKfvXbjukAcdzV5pCAMjrHoq%2BuWkMqC%3D5nw%40mail.gmail.com > . > -- You received this message because you are subscribed to the Google Groups "tmux-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/CAOLfK3UWV5bE2283arT-BsnN_b5%2BLPz1637D72Bo9YEJ_ELQCA%40mail.gmail.com.
