Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: beyond zsh v2.3.1



> On Mon, 26 Aug 1996, Julio Garcia wrote:
> 
> > o I have been using a function that gets called by chpwd that looks
> >   like this:
> > 
> >                 function print_banner {
> >                         print -n "\e]0;$1\a"
> >                 }
> 
> Shouldn't this be \e]2 instead? I have 
> chpwd () {
>         print -Pn "\e]2;${HOST}:%~ \a"
> }
> and this works.
> 

I have the following at the top of my .zshrc :

if [[ $TERM = "xterm" ]] && [[ "`stty size`" != "8 57" ]] then
    export PROMPT="%{^[]2;%m:%~%%^G%}%B[%?:%!]%b%# "
else
  export PROMPT='%B%m%b:%~%# '
  export RPROMPT='[%?:%!]'
fi

the bit of interest is the ^[]2; ...  which puts the enclosed text in the
title bar of an xterm or screen screen.

don't know about HPUX tho ...

Duncan Sargeant, http://www.ucc.gu.uwa.edu.au/~dunc/
 "You can pick your friends and you can pick your
   nose, but you can't pick your friend's nose."



Messages sorted by: Reverse Date, Date, Thread, Author