mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-08-19 12:53:52 +00:00
title: made title work again in screen
This commit is contained in:
parent
f72e778f26
commit
2c04013270
3 changed files with 18 additions and 6 deletions
|
@ -14,7 +14,11 @@ function do_prompt ()
|
|||
local TITLEBAR
|
||||
case $TERM in
|
||||
xterm*|*rxvt*|cygwin|interix|Eterm|mlterm|kterm|aterm|putty*)
|
||||
TITLEBAR='\[\033]1;\u@\h:\w\007\033]2;\u@\h:\w\007\]'
|
||||
if [ "${STY}" ] ; then
|
||||
TITLEBAR='\[\033k\u@\h:\w\033\134\]'
|
||||
else
|
||||
TITLEBAR='\[\033]1;\u@\h:\w\007\033]2;\u@\h:\w\007\]'
|
||||
fi
|
||||
;;
|
||||
screen*)
|
||||
TITLEBAR='\[\033k\u@\h:\w\033\134\]'
|
||||
|
|
|
@ -10,7 +10,11 @@ fi
|
|||
|
||||
case $TERM in
|
||||
xterm*|*rxvt*|cygwin|interix|Eterm|mlterm|kterm|aterm|putty*)
|
||||
TITLE=']1;${USER}:${PWD}]2;${USER}:${PWD}'
|
||||
if [ "${STY}" ] ; then
|
||||
TITLE='k${USER}:${PWD}\\'
|
||||
else
|
||||
TITLE=']1;${USER}:${PWD}]2;${USER}:${PWD}'
|
||||
fi
|
||||
;;
|
||||
screen*)
|
||||
TITLE='k${USER}:${PWD}\\'
|
||||
|
|
12
zsh/title
12
zsh/title
|
@ -64,10 +64,14 @@ function title
|
|||
print -nR $'\e]0;'$@$'\a'
|
||||
;;
|
||||
xterm*|*rxvt*|cygwin|Eterm|mlterm|kterm|aterm|putty*)
|
||||
# Use this one instead for everybody else:
|
||||
shift
|
||||
print -nR $'\e]1;'$@$'\a'
|
||||
print -nR $'\e]2;'$@$'\a'
|
||||
if [ "${STY}" ] ; then
|
||||
print -nR $'\ek'$2$'\e'"\\"
|
||||
else
|
||||
# Use this one instead for everybody else:
|
||||
shift
|
||||
print -nR $'\e]1;'$@$'\a'
|
||||
print -nR $'\e]2;'$@$'\a'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue