# Make sure ssh-agent can be reached
set -xg SSH_AUTH_SOCK "$XDG_RUNTIME_DIR/ssh-agent.socket"

# Use vim for git
set -xg VISUAL "vim"

set -xg PATH ~/.local/bin $PATH

# T(he )tmux session
alias ttmux "tmux attach-session; or tmux"

# Make sure ssh-agent can be reached
set -xg SSH_AUTH_SOCK "$XDG_RUNTIME_DIR/ssh-agent.socket"

# Use vim for git
set -xg VISUAL "vim"

set -xg PATH ~/.local/bin $PATH

# T(he )tmux session

if not tmux has -t "default" 2>&1 > /dev/null
  tmux new -d -s "default"
end
if test -z "$TMUX"
  set default_is_attached (string split ' ' (tmux ls -F '#{session_name} #{session_attached}' | grep "default"))[2]
  if test "$default_is_attached" = "0"
    exec tmux attach -t "default"
  end
end

Make starting/attaching tmux default behaviour
Make starting/attaching tmux default behaviour

If tmux is already started and attached, the
session will be left alone and fish will
start normally

wilfriedvanasten/miscvar,wilfriedvanasten/miscvar,wilfriedvanasten/miscvar