Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
from tcsh to zsh (alias)
- X-seq: zsh-users 15103
- From: Leander Jedamus <ljedamus@xxxxxx>
- To: zsh-users@xxxxxxx
- Subject: from tcsh to zsh (alias)
- Date: Tue, 08 Jun 2010 12:22:49 +0200
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Sender: ljedamus@xxxxxx
Hi!
When I log in on antother machine with ssh, i want, that in the terminal
window the address of this machine is shown. When I log out, the
original machine name should be displayed. In tcsh I do the following:
alias cwdcmd 'echo -n
"\033]2;${USER}@${HOST}:$cwd\007\033]1;${USER}@${HOST}:$cwd\007"'
alias ssh 'ssh \!* ; cd .'
Now all parameters for the alias go to the original ssh-program. After
that a "cd ." is done and everything is okay.
Now I want that under zsh:
if [ -n "$DISPLAY" ]; then
chpwd()
{
echo -n
"\e]2;${USER}@${HOST}:${PWD}\007\e]1;${USER}@${HOST}:${PWD}\007";
};# chpwd()
cd .
fi
but now:
alias ssh="ssh $* ; cd ."
doesn't work as extpected.
What do I have to do now?
Thanks in advance
Leander Jedamus
Messages sorted by:
Reverse Date,
Date,
Thread,
Author