From eee0128e5aa3ef4711c1cf2d71c3d8c30a531fb1 Mon Sep 17 00:00:00 2001 From: Werner Freund Date: Mon, 12 Oct 2015 16:50:14 +0200 Subject: [PATCH] Some modified changes on screen --- lib/termsupport.zsh | 6 +++--- plugins/screen/screen.plugin.zsh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 871ab28df..f386e671e 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -56,7 +56,7 @@ function omz_termsupport_precmd { return fi - title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE + title ${MANUAL_TITLE:-$ZSH_THEME_TERM_TAB_TITLE_IDLE} ${MANUAL_TITLE:-$ZSH_THEME_TERM_TITLE_IDLE} } # Runs before executing the command @@ -69,8 +69,8 @@ function omz_termsupport_preexec { fi # cmd name only, or if this is sudo or ssh, the next cmd - local CMD=${1[(wr)^(*=*|sudo|ssh|mosh|rake|-*)]:gs/%/%%} - local LINE="${2:gs/%/%%}" + local CMD=${MANUAL_TITLE:-${1[(wr)^(*=*|sudo|ssh|mosh|rake|-*)]:gs/%/%%}} + local LINE=${MANUAL_TITLE:-"${2:gs/%/%%}"} title '$CMD' '%100>...>$LINE%<<' } diff --git a/plugins/screen/screen.plugin.zsh b/plugins/screen/screen.plugin.zsh index 7009e7a91..3cec8d4f4 100644 --- a/plugins/screen/screen.plugin.zsh +++ b/plugins/screen/screen.plugin.zsh @@ -42,13 +42,13 @@ if [[ "$TERM" == screen* ]]; then local -a cmd; cmd=(${(z)1}) # the command string eval "tab_title=$TAB_TITLE_PREFIX:$TAB_TITLE_EXEC" eval "tab_hardstatus=$TAB_HARDSTATUS_PREFIX:$TAB_HARDSTATUS_EXEC" - screen_set $tab_title $tab_hardstatus + screen_set ${MANUAL_TITLE:-$tab_title} ${MANUAL_TITLE:-$tab_hardstatus} } # called by zsh before showing the prompt function precmd() { eval "tab_title=$TAB_TITLE_PREFIX:$TAB_TITLE_PROMPT" eval "tab_hardstatus=$TAB_HARDSTATUS_PREFIX:$TAB_HARDSTATUS_PROMPT" - screen_set $tab_title $tab_hardstatus + screen_set ${MANUAL_TITLE:-tab_title} ${MANUAL_TITLE:-$tab_hardstatus} } -fi \ No newline at end of file +fi