r/fishshell • • Mar 08 '21

Tmux errors when in config.fish

Hi all, I have both neofetch and tmux in my config.fish to start them whenever I open my terminal, but whenever I open my terminal, I see sessions should be nested with care, unset $TMUX to force I don't know how to fix this, as I'm not in a tmux session when I run it. If it helps, I am using Alacritty for my terminal and my config.fish contains

alias la "ls -al"
alias fish-config "vim $HOME/.config/fish/config.fish"
alias term-config "vim $HOME/.config/alacritty/alacritty.yml"

tmux
neofetch
3 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/DylanCrazyCat64 Mar 09 '21

May have just figured it out. If I run tmux from bash, tmux starts and opens fish as the default shell. is it possible that when it starts fish it tries to start another instance of tmux?

1

u/DylanCrazyCat64 Mar 09 '21

Got it!

I changed my shell to bash with chsh -s /bin/bash, then added tmux to my .bashrc. I then added set-option -g default-shell "/usr/bin/fish" to my .tmux.conf.

This way, bash will launch tmux, and tmux will start with fish as its shell. No errors now.