i added the tmux plugin to my .zshrc file and when i try to make it run on startup with TMUX_AUTOSTART=true
it'll just shows the terminal window and disappears under a second. then i open it again and i can work. again after a while if i close the terminal and try to run it again it might happen or it might run correctly and let me work it's getting really annoying.
and when i try other code to run tmux on start up like these:
if command -v tmux &> /dev/null && [ -n "$PS1" ] &&
[[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] &&
[ -z "$TMUX" ]; then
exec tmux
fi
or
[[ $- != *i* ]] && return
[[ -z "$TMUX" ]] && exec tmux
or
[ -z "$TMUX" ] && { tmux attach || exec tmux new-session && exit;}
or any other code, the terminal just opens up and close itself in under a second for ever. It closes every time then.