In my .zshrc, I have
ENABLE_TMUX="TRUE"
for one of the lines. This doesn't seem to work, as tmux never launches on a new shell, and the environment variable ENABLE_TMUX is always false when I start a shell. The rest of my zshrc works fine, however. I'm not sure why this wouldn't work.
### START TMUX IF ENABLED ABOVE ###
if [ "$ENABLE_TMUX" = "TRUE" ]; then
# start tmux if not already running
if [[ ! "$TTY" =~ "/dev/tty" ]]; then
case $(ps -p $(ps -p $$ -o ppid=) o args=) in
tmux*|*vscode*|*xterm*|*kdevelop*|*ascii*)
sleep 0
;;
*)
tmux
;;
esac
fi
fi
###
This is the function that starts tmux. Not sure what's wrong here, if anything. I am on Xubuntu 18.04.
printf
s orecho
s here and there and if it is that means you do not enterif
condition at all or enter the firstcase
ortmux
fails to start. Try to runtmux
in interactive shell first to make sure.ENABLE_TMUX
is always FALSE - it means that it has be explicitly set toFALSE
somewhere before reaching this function as variables do not take FALSE as value implicitly. Try to doENABLE_TMUX=TRUE
in the line aboveif [ "$ENABLE_TMUX" = "TRUE" ]; then
and it should work. You could also show your entire~/.zshrc
if you are not sure what's going on.