Why are random letters inserted in my tmux session?

Is there a way to have tmux use the current virtualenv when I create a new window?

  • Let's say I'm in a Python virtualenv at the moment, and I do 'PREFIX c' to create a new window. Or I actually create a new tmux session while I have a virtualenv activated. Is there any way to have the current virtualenv be activated in that new window/session?

  • Answer:

    Damn, I actually figured it out immediately after posting the question :) It turns out the problem was in my .zshrc. I do 'workon default' when I launch a new shell, but that'll override my current virtualenv. So I added: if [ -n "$VIRTUAL_ENV" ]; then   . "$VIRTUAL_ENV/bin/activate" else   workon default fi Problem solved. This is possible because tmux windows get the environment of the shell that originally launched tmux (if I understand correctly).

Zachary Voase at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.