sorin-ionescu / prezto

The configuration framework for Zsh
MIT License
13.98k stars 4.49k forks source link

Temporarily disable tmux auto-start #1972

Closed zoqaeski closed 2 years ago

zoqaeski commented 2 years ago

Description

Prezto currently includes an option to automatically start tmux, which is quite useful. However, sometimes there are situations when you might want to prevent tmux from starting a new session (e.g. opening a new terminal window to SSH into a different machine). Suspending or exiting the tmux session causes the terminal window to close.

It would be useful to provide some way of temporarily disabling tmux autostart in these instances.

ezintz commented 2 years ago

You need to configure it accordingly by setting an environment variable e.g. TMUX_AUTOSTART_DISABLE. For example I disable autostart if I start a new terminal within my IDE: [[ ! -z "$INTELLIJ_ENVIRONMENT_READER" ]] && TMUX_AUTOSTART_DISABLE=1

Hope that helps.