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

from tcsh to zsh (alias)



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