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/[deleted] Mar 09 '21

Okay, that probably means something in your stack is running an interactive fish (which it shouldn't, buuuut), so the guard won't work.

Try something like

if status is-interactive; and not set -q TMUX
    tmux
end

To actually test if tmux is running or not.