diff --git a/zsh/.zshrc b/zsh/.zshrc index 5f62286..b43400d 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -167,6 +167,11 @@ function o () { xdg-open "$1" &! } +if [ "$SSH_CLIENT" ] +then + source_port=$(echo $SSH_CLIENT | awk '{ print $2 }') + echo $$ > /tmp/ssh_session_$source_port +fi if [[ "$TERM" == (Eterm*|alacritty*|aterm*|gnome*|konsole*|kterm*|putty*|rxvt*|screen*|tmux*|xterm*) ]]; then add-zsh-hook -Uz precmd xterm_title_precmd