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