screen: Bugfixes

Multiple bugfixes in this patch:
1) Do not evaluate $TITLE.
2) Do not let normal title code set screen session titles if screen
plugin is active
3) Use default way to set hardstatus in screen, not xterm compatible
string.

Signed-off-by: Markus Pargmann <mpargmann@allfex.org>
This commit is contained in:
Markus Pargmann 2012-12-13 23:16:25 +01:00
commit 229ef8cfdc
2 changed files with 18 additions and 7 deletions

View file

@ -31,10 +31,10 @@ if [[ "$TERM" == screen* ]]; then
function screen_set()
{
# set the tab window title (%t) for screen
print -nR $'\033k'$1$'\033'\\\
print -nR $'\033k'"$1"$'\033'\\\
# set hardstatus of tab window (%h) for screen
print -nR $'\033]0;'$2$'\a'
print -nR $'\033_'"$2"$'\033'\\\
}
# called by zsh before executing a command
function preexec()
@ -42,8 +42,8 @@ if [[ "$TERM" == screen* ]]; then
local -a cmd; cmd=(${(z)3}) # the command string
if [ "$TITLE" != "" ]
then
eval "tab_title=$TITLE:$TAB_TITLE_EXEC"
eval "tab_hardstatus=$TITLE:$TAB_HARDSTATUS_EXEC"
eval "tab_title=\"$TITLE\":$TAB_TITLE_EXEC"
eval "tab_hardstatus=\"$TITLE\":$TAB_HARDSTATUS_EXEC"
else
eval "tab_title=$TAB_TITLE_PREFIX:$TAB_TITLE_EXEC"
eval "tab_hardstatus=$TAB_HARDSTATUS_PREFIX:$TAB_HARDSTATUS_EXEC"
@ -55,8 +55,8 @@ if [[ "$TERM" == screen* ]]; then
{
if [ "$TITLE" != "" ]
then
eval "tab_title=$TITLE:$TAB_TITLE_PROMPT"
eval "tab_hardstatus=$TITLE:$TAB_HARDSTATUS_PROMPT"
eval "tab_title=\"$TITLE\":$TAB_TITLE_PROMPT"
eval "tab_hardstatus=\"$TITLE\":$TAB_HARDSTATUS_PROMPT"
else
eval "tab_title=$TAB_TITLE_PREFIX:$TAB_TITLE_PROMPT"
eval "tab_hardstatus=$TAB_HARDSTATUS_PREFIX:$TAB_HARDSTATUS_PROMPT"