From ae4693451c83e048b8bce71935b8dfe1b5d3bf74 Mon Sep 17 00:00:00 2001 From: Von Random Date: Thu, 21 Jun 2018 14:57:05 +0300 Subject: [PATCH] quite devious: if prefix, p is used, tell ssh to use custom TERM value; also more features for zsh --- tmux.conf | 2 +- zshrc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tmux.conf b/tmux.conf index 25861de..ba46981 100644 --- a/tmux.conf +++ b/tmux.conf @@ -16,7 +16,7 @@ bind + resize-pane -U 5 bind e choose-session bind t command-prompt -p "attach pane to:" "join-pane -t :'%%'" bind y command-prompt break-pane -bind p command-prompt -p "ssh:" "new-session -As '2-ssh'; new-window -n '%1' 'ssh %%'" +bind p command-prompt -p "ssh:" "new-session -As 'ssh'; new-window -n '%1' 'TERM=screen ssh %%'" bind -n M-w next-window bind -n M-q previous-window bind -n M-j next-window diff --git a/zshrc b/zshrc index 6e257df..caeefac 100644 --- a/zshrc +++ b/zshrc @@ -75,10 +75,10 @@ PROMPT3='%b%f?%(!.%F{red}.%F{black})#%f%b ' PROMPT4='%b%f+%N:%i%(!.%F{red}.%F{black})>%f%b ' precmd.title() { case $TERM in - xterm*|rxvt*) + st*|xterm*|rxvt*) printf "\033]0;%s@%s\007" $USER ${HOST%%.*} ;; - screen*|tmux) + screen*|tmux*) printf "\033k%s@%s\033\\" $USER ${HOST%%.*} ;; esac