zsh-users
 help / color / mirror / code / Atom feed
* from tcsh to zsh (alias)
@ 2010-06-08 10:24 Leander Jedamus
  2010-06-08 10:32 ` Peter Stephenson
  0 siblings, 1 reply; 6+ messages in thread
From: Leander Jedamus @ 2010-06-08 10:24 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 6+ messages in thread
* from tcsh to zsh (alias)
@ 2010-06-08 10:22 Leander Jedamus
  2010-06-08 20:22 ` Wayne Davison
  0 siblings, 1 reply; 6+ messages in thread
From: Leander Jedamus @ 2010-06-08 10:22 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-06-08 20:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-08 10:24 from tcsh to zsh (alias) Leander Jedamus
2010-06-08 10:32 ` Peter Stephenson
2010-06-08 10:43   ` Leander Jedamus
2010-06-08 11:04     ` Sebastian Stark
  -- strict thread matches above, loose matches on Subject: below --
2010-06-08 10:22 Leander Jedamus
2010-06-08 20:22 ` Wayne Davison

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).