auto launch tmux on ssh
This commit is contained in:
parent
1e4b5d6001
commit
fd74f0fd91
@ -16,6 +16,15 @@ else
|
||||
eval `dircolors ~/.dircolors/dircolors.ansi-dark`
|
||||
fi
|
||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||
|
||||
#launch tmux on ssh connection
|
||||
|
||||
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
|
||||
tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ -z "$SSH_AUTH_SOCK" ] ; then
|
||||
eval `ssh-agent -s`
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user