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

Re: PATCH: zftp xterm titlebar



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



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