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

Re: beyond zsh v2.3.1



 Julio> o I have been using a function that gets called by chpwd that looks
 Julio> like this:

 Julio>                 function print_banner { print -n "\e]0;$1\a" }

 Julio>   The purpose of it is to set the title of the xterm to the first
 Julio> parameter.  With zsh 2.6 the title does not change and the string is
 Julio> simply output to stdout (tty maybe?).  I also tried to use a simple
 Julio> program that I have called xlabel which does the same thing as the
 Julio> print statement above.  I had used xlabel with ksh in the past, but it
 Julio> realy wedged zsh when I use it in chpwd().  I had this problem with
 Julio> 2.5 as well.

I use the escape feature in the prompt to do this:

PROMPT='%{]2;%M:%~%}%l %T %h%#'
RPROMPT=' %m:%~'

I define the following so I can turn it on and off at will:

noactiveprompt() { PROMPT='%l %T %h%#' }
activeprompt() { PROMPT='%{]2;%M:%~%}%l %T %h%#' }
alias nap=noactiveprompt
alias ap=activeprompt



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