Skip to content

Spawns another shell (only one term) with WSL2 #197

Closed
@OlivierMary

Description

@OlivierMary

Hi there,

Just try the new release 3.0.6.

And with WSL2 I have another tmux client.

I had this code at the end of my .zshrc :

if [[ -z "$TMUX" ]]; then
  tmux new-window -n "DIR $(basename $PWD)" -t TMUX
  nbTerm=$(tmux list-clients | grep TMUX | wc -l)
  if [[ $nbTerm -eq 0 ]]; then
    tmux attach -t TMUX || tmux new -s TMUX -n MAIN
  else
   #exit 0;
  fi
fi

I commented the exit 0; to debug why the wsltty windows exited.

So with only one terminal I got a zsh term (not the needed tmux session) and I see a tmux client connected :

image

image

if I attach the session I got this:
image

So another unknow tmux term with low size connected.

That explain why my term exited with the exit 0; but that code work since a long time.
I can change the code to keep 2 clients but that broke the size of all automatic initialized tmux sessions. I have to kill 'TMUX' session and recreate it, not a good deal...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions