zsh-users
 help / color / mirror / code / Atom feed
From: Andrey Borzenkov <arvidjaar@newmail.ru>
To: zsh-users@sunsite.dk
Cc: zzapper <david@tvis.co.uk>
Subject: Re: duplicating functions
Date: Thu, 20 Oct 2005 20:13:20 +0400	[thread overview]
Message-ID: <200510202013.20744.arvidjaar@newmail.ru> (raw)
In-Reply-To: <kqoel1ltvbmfqr9jg46tkj2p1gh9b9t6io@4ax.com>

[-- Attachment #1: Type: text/plain, Size: 718 bytes --]

On Thursday 20 October 2005 13:35, zzapper wrote:
> Hi,
> I have a series of functions defined .zshenv
>
> function g0() { gmark $0 $* }
> function g1() { gmark $0 $* }
> function g2() { gmark $0 $* }
> function g3() { gmark $0 $* }
> function g4() { gmark $0 $* }
> function g5() { gmark $0 $* }
> function g6() { gmark $0 $* }
> function g7() { gmark $0 $* }
> function g8() { gmark $0 $* }
> function g9() { gmark $0 $* }
>
> Where gmark contains the code and $0 is used to determine which original
> function was called
>
> Is there are simpler way of doing this

function g{0..9} { gmark $0 $* }

but I still do not understand what's wrong with calling "gmark gN ..." 
directly

-andrey

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2005-10-21  3:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-20  9:35 zzapper
2005-10-20 11:59 ` Jean Chalard
2005-10-20 12:05   ` zzapper
2005-10-20 14:33 ` Bart Schaefer
2005-10-20 16:13 ` Andrey Borzenkov [this message]
2005-10-21  8:35   ` zzapper
2005-10-21 14:48     ` Speedy directory generation Meino Christian Cramer
2005-10-21 14:52       ` Peter Stephenson
2005-10-21 15:14         ` Meino Christian Cramer
     [not found]       ` <20051021145708.GV4387@wu.physik.uni-dortmund.de>
2005-10-21 15:18         ` Meino Christian Cramer

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=200510202013.20744.arvidjaar@newmail.ru \
    --to=arvidjaar@newmail.ru \
    --cc=david@tvis.co.uk \
    --cc=zsh-users@sunsite.dk \
    /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).