From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27395 invoked from network); 10 Dec 1999 18:38:43 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 10 Dec 1999 18:38:43 -0000 Received: (qmail 8312 invoked by alias); 10 Dec 1999 18:38:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8994 Received: (qmail 8304 invoked from network); 10 Dec 1999 18:38:37 -0000 Sender: aduret@antares.l2i To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: zftp xterm titlebar References: <19991210110607.A9218@dman.com> From: Alexandre Duret-Lutz Date: 10 Dec 1999 19:38:43 +0000 In-Reply-To: Clint Adams's message of "Fri, 10 Dec 1999 11:06:07 -0500" Message-ID: <7dpuweio1o.fsf@antares.l2i> User-Agent: Gnus/5.0700000000000003 (Pterodactyl Gnus v0.97) Emacs/20.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii May I propose the following patch that also take `rxvt', `Eterm', and `dtterm' (from Sun CDE) into account ? Are there other xterm-compatible terminals emulators around ? (the following should be applied after Clint's 8993) --- Functions/Zftp/zftp_chpwd~ Fri Dec 10 18:42:49 1999 +++ Functions/Zftp/zftp_chpwd Fri Dec 10 18:48:10 1999 @@ -35,7 +35,7 @@ case $TERM in sun-cmd) print -n -P "\033]l$str\033\\" ;; - *xterm*) print -n -P "\033]2;$str\a" + *xterm*|rxvt|dtterm|Eterm) print -n -P "\033]2;$str\a" ;; esac fi --- Etc/FAQ.yo~ Fri Dec 10 18:35:03 1999 +++ Etc/FAQ.yo Fri Dec 10 18:42:00 1999 @@ -1122,7 +1122,7 @@ You should use the special function mytt(chpwd), which is called when the directory changes. The following checks that standard output is a terminal, then puts the directory in the title bar if the terminal - is an tt(xterm) or a tt(sun-cmd). + is compatible with tt(xterm) or is a tt(sun-cmd). verb( chpwd() { @@ -1130,7 +1130,7 @@ case $TERM in sun-cmd+CHAR(41) print -Pn "\e]l%~\e\\" ;; - xterm+CHAR(41) print -Pn "\e]2;%~\a" + *xterm*|rxvt|dtterm|Eterm+CHAR(41) print -Pn "\e]2;%~\a" ;; esac } --- Doc/Zsh/zftpsys.yo~ Sun Nov 28 17:42:27 1999 +++ Doc/Zsh/zftpsys.yo Fri Dec 10 19:02:23 1999 @@ -97,10 +97,10 @@ given as `tt(?)' it will be prompted for. If var(host) is not present, use a previously stored set of parameters. -If the command was successful, and the terminal is an tt(xterm), a summary -will appear in the title bar, giving the local tt(host:directory) and the -remote tt(host:directory); this is handled by the function tt(zftp_chpwd), -described below. +If the command was successful, and the terminal is compatible with +tt(xterm) or is tt(sun-cmd), a summary will appear in the title bar, +giving the local tt(host:directory) and the remote tt(host:directory); +this is handled by the function tt(zftp_chpwd), described below. Normally, the var(host), var(user) and var(password) are internally recorded for later re-opening, either by a tt(zfopen) with no arguments, or @@ -466,9 +466,10 @@ item(tt(zftp_chpwd))( This function is called every time a connection is opened, or closed, or the remote directory changes. This version alters the title bar of an -tt(xterm) or tt(sun-cmd) terminal emulator to reflect the local and remote -hostnames and current directories. It works best when combined with the -function tt(chpwd). In particular, a function of the form +tt(xterm) compatible or tt(sun-cmd) terminal emulator to reflect the +local and remote hostnames and current directories. It works best when +combined with the function tt(chpwd). In particular, a function of +the form example(chpwd() { if [[ -n $ZFTP_USER ]]; then -- Alexandre Duret-Lutz