zsh-users
 help / color / mirror / code / Atom feed
From: "Christoph (Stucki) von Stuckrad" <stucki@mi.fu-berlin.de>
To: zsh-users@zsh.org
Subject: Re: [Zsh bug] function define bug
Date: Wed, 25 Nov 2015 10:16:18 +0100	[thread overview]
Message-ID: <20151125091617.GA1649@localhost.mi.fu-berlin.de> (raw)
In-Reply-To: <CAPO9ZdoihgmPveL6d+mo1YUHZJj+FwaxJLx8w5FR2LWSoR4gFQ@mail.gmail.com>

On Wed, 25 Nov 2015, Ngô Huy wrote:

> I don't see reason for multiple functions have same body but different
> name. Let's me know if I'm wrong :)

There are some programs, which do different things, if called by
different names (mostly links or symlinks to the same binary).

So to 'wrap' such a beast you'd need to wrap lost of names to
the same function, which inside it would call something like
{ command $0 "$@" }

This is the only case I ever used somethng like
lots of different names at onece real_name() {
        wrapper contents
}
to define all the things at once.

Stucki

-- 
Christoph von Stuckrad      * * |nickname |Mail <stucki@mi.fu-berlin.de> \
Freie Universitaet Berlin   |/_*|'stucki' |Tel(Mo.,Mi.):+49 30 838-75 459|
Mathematik & Informatik EDV |\ *|if online|  (Di,Do,Fr):+49 30 77 39 6600|
Takustr. 9 / 14195 Berlin   * * |on IRCnet|Fax(home):   +49 30 77 39 6601/


  reply	other threads:[~2015-11-25  9:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25  3:46 Ngô Huy
2015-11-25  4:06 ` Matthew Martin
2015-11-25  4:20   ` Ngô Huy
2015-11-25  8:49     ` Cuong Manh Le
2015-11-25  9:03       ` Ngô Huy
2015-11-25  9:04         ` Ngô Huy
2015-11-25  9:16           ` Christoph (Stucki) von Stuckrad [this message]
2015-11-25  9:20         ` Cuong Manh Le
2015-11-25  9:39           ` Ngô Huy
2015-11-25  9:58             ` Cuong Manh Le
2015-11-25 10:00             ` Peter Stephenson
2015-11-25 10:13               ` Ngô Huy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151125091617.GA1649@localhost.mi.fu-berlin.de \
    --to=stucki@mi.fu-berlin.de \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).