zsh-users
 help / color / mirror / code / Atom feed
* Is there a kind of function factory in zsh?
@ 2010-06-08 15:26 Leander Jedamus
  2010-06-08 15:34 ` Mikael Magnusson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Leander Jedamus @ 2010-06-08 15:26 UTC (permalink / raw)
  To: zsh-users

Hi!

I wonder if I could use a pattern for creating fucntions, that nearly 
look the same.
Background is I have to write a function for ssh, telnet, su, bash, zsh, 
tcsh and so on that all look like (for example for the ssh command):
ssh()
     {
       set_title "ssh $@"
       {
         command ssh "$@"
       } always {
         cd .
       }
     };# ssh()
How can I avoid writing all that code again and again?

Thanks in advance
Leander Jedamus


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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-08 15:26 Is there a kind of function factory in zsh? Leander Jedamus
2010-06-08 15:34 ` Mikael Magnusson
2010-06-08 15:37 ` Daniel Friesel
2010-06-08 16:00 ` Alexey I. Froloff

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).