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`
|
eval `dircolors ~/.dircolors/dircolors.ansi-dark`
|
||||||
fi
|
fi
|
||||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
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
|
if [ -z "$SSH_AUTH_SOCK" ] ; then
|
||||||
eval `ssh-agent -s`
|
eval `ssh-agent -s`
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user