mirror of
https://github.com/bertptrs/vimconfig.git
synced 2025-12-25 20:40:32 +01:00
Simplify tmux ssh autostart.
This commit is contained in:
12
zsh/.zshrc
12
zsh/.zshrc
@@ -1,11 +1,9 @@
|
|||||||
# If connected over SSH and not already in tmux, start tmux.
|
# If connected over SSH and not already in tmux, start tmux.
|
||||||
if [[ -o interactive ]]; then
|
if [[ -o interactive ]] && [[ -n $SSH_TTY ]] && [[ -z $TMUX ]] && hash tmux &> /dev/null; then
|
||||||
if [[ -n $SSH_TTY ]] && [[ -z $TMUX ]] && hash tmux &> /dev/null; then
|
if tmux has-session &> /dev/null; then
|
||||||
if tmux has-session &> /dev/null; then
|
exec tmux attach
|
||||||
exec tmux attach
|
else
|
||||||
else
|
exec tmux
|
||||||
exec tmux
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user