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

Re: [Zsh bug] function define bug



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@xxxxxxxxxxxxxxx> \
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/



Messages sorted by: Reverse Date, Date, Thread, Author