From 7cdf1f1b15cfe173a9a7fdb593e72815308e699f Mon Sep 17 00:00:00 2001 From: ds6 Date: Thu, 30 Nov 2017 18:48:28 -0600 Subject: [PATCH] added ssh display to zsh title, made VICOL strict --- base/.zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/.zshrc b/base/.zshrc index 5fdafa8..4c2fdb4 100644 --- a/base/.zshrc +++ b/base/.zshrc @@ -5,8 +5,8 @@ zstyle ':vcs_info:*' get-revision true zstyle ':vcs_info:git*' formats "(%F{green}%r/%b%f) %m%u%c " function precmd { + print -Pn "\e]0;${SSH_CLIENT+$USER@$HOST}%#zsh%(1j,:%j,):%~\a" vcs_info - print -Pn "\e]0;%#zsh%L %(1j,%jj ,)%~\a" } function preexec { printf "\033]0;%s\a" "$1" @@ -18,7 +18,7 @@ PROMPT='%F{$VICOL}%n%f@%F{$VICOL}%m%f%(?../%F{red}$?%f)%# ' RPROMPT='${vcs_info_msg_0_}%F{yellow}%~%f %T' function zle-line-init zle-keymap-select { - VICOL="${${KEYMAP/vicmd/red}/(main|viins)/green}" + VICOL="${${KEYMAP:/vicmd/red}:/(main|viins)/green}" zle reset-prompt } zle -N zle-line-init -- 2.47.0