quite devious: if prefix, p is used, tell ssh to use custom TERM value; also more features for zsh
This commit is contained in:
parent
ee89591386
commit
ae4693451c
2 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ bind + resize-pane -U 5
|
||||||
bind e choose-session
|
bind e choose-session
|
||||||
bind t command-prompt -p "attach pane to:" "join-pane -t :'%%'"
|
bind t command-prompt -p "attach pane to:" "join-pane -t :'%%'"
|
||||||
bind y command-prompt break-pane
|
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-w next-window
|
||||||
bind -n M-q previous-window
|
bind -n M-q previous-window
|
||||||
bind -n M-j next-window
|
bind -n M-j next-window
|
||||||
|
|
4
zshrc
4
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 '
|
PROMPT4='%b%f+%N:%i%(!.%F{red}.%F{black})>%f%b '
|
||||||
precmd.title() {
|
precmd.title() {
|
||||||
case $TERM in
|
case $TERM in
|
||||||
xterm*|rxvt*)
|
st*|xterm*|rxvt*)
|
||||||
printf "\033]0;%s@%s\007" $USER ${HOST%%.*}
|
printf "\033]0;%s@%s\007" $USER ${HOST%%.*}
|
||||||
;;
|
;;
|
||||||
screen*|tmux)
|
screen*|tmux*)
|
||||||
printf "\033k%s@%s\033\\" $USER ${HOST%%.*}
|
printf "\033k%s@%s\033\\" $USER ${HOST%%.*}
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue