Skip to content

Commit

Permalink
fix(zsh): only auto attach to tmux when SHLVL == 1
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamHsieh committed Jan 8, 2024
1 parent 3ca6752 commit 9b2d637
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[[ -e ~/.local.zsh ]] && source ~/.local.zsh

# auto attach to tmux
[ -n "$PS1" ] && [ -z "$TMUX" ] && $(tmux has-session 2> /dev/null) && tmux a
[ -n "$PS1" ] && [ -z "$TMUX" ] && [ $SHLVL = 1 ] && $(tmux has-session 2> /dev/null) && tmux a

# export
export LANG=en_US.UTF-8
Expand Down

0 comments on commit 9b2d637

Please sign in to comment.