mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 22:11:54 +02:00
zsh-workers/8994
This commit is contained in:
parent
e721ca5e67
commit
3b4009cd53
3 changed files with 12 additions and 11 deletions
|
@ -97,10 +97,10 @@ is necessary, account var(account)). If a necessary parameter is missing or
|
|||
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 @@ findex(zftp_chpwd, supplied version)
|
|||
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
|
||||
|
|
|
@ -49,7 +49,7 @@ description(\
|
|||
mydit(Archive-Name:) unix-faq/shell/zsh
|
||||
mydit(Last-Modified:) 1999/07/30
|
||||
mydit(Submitted-By:) email(pws@ibmth.df.unipi.it (Peter Stephenson))
|
||||
mydit(Version:) $Id: FAQ.yo,v 1.1.1.15 1999/11/30 06:12:09 akr Exp $
|
||||
mydit(Version:) $Id: FAQ.yo,v 1.1.1.16 1999/12/10 18:42:38 akr Exp $
|
||||
mydit(Posting-Frequency:) Monthly
|
||||
mydit(Copyright:) (C) P.W. Stephenson, 1995--1999 (see end of document)
|
||||
)
|
||||
|
@ -1122,7 +1122,7 @@ sect(How do I automatically display the directory in my xterm title bar?)
|
|||
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 @@ sect(How do I automatically display the directory in my xterm title bar?)
|
|||
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
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ else
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue