I have set my zsh
auto start a tmux session when there is no one, like this
if [[ ! $TERM =~ screen ]]; then
exec tmux
fi
Yeah, this works fine, however when I detach the session, the terminal(I am using gnome-shell) will exit too. How do I avoid it
tmux
instead ofexec
, but that just raises the question of why you are usingexec
in the first place.tmux
andexec tmux
, I just copy from somewhere in this site.