From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17405 invoked from network); 12 Feb 2021 09:31:41 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Feb 2021 09:31:41 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613122301; b=Yvg3aKsLUniWqukQedB5Sqi1uAIkj63vQcRP0livKQbhIfQRVoVOA2BoBAkY11C4FNAgkD1nn9 AufLYp13DrARMteaKPBvILkoRt3n4dZyj4yVvQp/KJmx7U7fEt9qPA5yMF6Dk2YfkcRcrYU9CJ ay+y+iYE8em6xSj6k3XpycIG7nP8PupErkMOFUbzOoHc39FvQ07k/5ZEYZVa+O2WSYyTJLTeWT /PG7Z0WT2/BC2LEH2x+Xr/Ehgs2tb+D1iB5gB4u7BlGuVtAGiLvCUlrvPmSTsqr/xl0sqA8Khg at+o74A2xjR0YDjjsN58G252ceWuRAzHIsD2JlSfRpUWsw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-il1-f176.google.com) smtp.remote-ip=209.85.166.176; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1613122301; bh=w1/RGYgz8oWht5Gke+u04YJVq53/lZcFGNH0D6NtMFw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=X33U8t13N+NPvp09UW5xIX776P3AXzgmQsx97U7TlIlVvRPgLco5oafSpQVEd8hTofs9WohgS+ Sk+GK67cIK/1eL4AHLC9rKL0HZwoiR5xhyHLCW0eJxkF6DzQ637jozXmcY3zVsoUUMYjqW9BS6 sH7Z23ZSs9NtnN3RfKuR3bx/wj9ORYkec8QJzdNHyWPoALCssXaEvrzyHqycYRczotQlWvZP+s mu6xa+L/i79Mq92q1UAuJacXVXUysW5Ql9afn8U0caawBh7kVskgQQnOmk6fcMLgRBRy4FHOEH EOqcMUCQXs89n/CmnAjjkvMBzhypaLYWP9/jEC3dluBU5w==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=LWo17S515wpk8VMcooJKUnngkwftm4Dbq6jkQe1qLxA=; b=ai+cqa29bJm3qBsOjZ0eiwRxmY J9o2I8gLLfoZhYxzapfqCm7OBApdEuqKDbPXUikDu2pcdUjUTkkyF2qLsIjXERG51a1Gd27AHbkPZ YV1gVjKQMsttPtuA0IlhSjY6h5xfIT1jfQRUIr2csUNcs5f+eLFxysFVaMyU2f8YFVkAOxcqxY+gg VBlSOuvxf5yUnxHa1gFHAmKh0PacU12WrvufrlMFJidsTwm6hsfzkL5VfY3kskimNK3zhn9wRqcXY NdhdokNuQZQtuH2lwb4r1A0lMOLLJsc159JPgTdckKFm9j1c13Rmo5G5ZhZ/i0Bpbg0yiQSQ6j2Np x4HAcHgQ==; Received: from authenticated user by zero.zsh.org with local id 1lAUna-00060e-VP; Fri, 12 Feb 2021 09:31:39 +0000 Authentication-Results: zsh.org; iprev=pass (mail-il1-f176.google.com) smtp.remote-ip=209.85.166.176; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-il1-f176.google.com ([209.85.166.176]:41085) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lAUmv-0005Di-OQ; Fri, 12 Feb 2021 09:30:58 +0000 Received: by mail-il1-f176.google.com with SMTP id p15so7622024ilq.8 for ; Fri, 12 Feb 2021 01:30:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LWo17S515wpk8VMcooJKUnngkwftm4Dbq6jkQe1qLxA=; b=ej2cfTRN8f1WppJ9sYqf2x6/lvpOXE53f1lvk9vBnBAxhZ+OnGoXjZjPEDug17LKbz 2/Yu15zgFfFpUBbWR5jkV3Vo/BnQba85PsajbDvDFRfsWoi4ConY082YHzvYpzA5XhE0 ejBy7iP4BUF1ovx1UAn11W+gpDRmbf09J8EBIUx+myarMg3zzclsK9vuWcXY1bcOQ97T +KyYBN2M5CqiD87dMpj8+VFHaUYN0TeEYxQtJV1HCp7ecwV2eLKtKrItClbc5nT+7OYP CGLeJgPGIuvQedmQfxmeCZFevWLQDOJcnwkMrjaDfOao50TZStAvMYL4WVbmGhZcoQs+ QcNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LWo17S515wpk8VMcooJKUnngkwftm4Dbq6jkQe1qLxA=; b=rK0z+EUpaFGvs35Wv0d3/6WVd886msFwGzDJe87vslrHGnBiVbQqrjv1Fsfr9Bcp3d OjFEPAhz0MBlf384nLGJX7WixclqhOaI2Y8aK8eTIioWGLA0Vv29bEPmz0ddeaRGIGa5 msD3kl4WFC+UB2AW3acZ6UMejmmH8hMACjTw4MhbsQcMXyJyeGQ6shhjvxZJ+0q49g+5 74954dE2vHeA+gzob4OO2BLnPNla7bmsg8po/ODDvUIBVNxl6IvbwaCR7poUQ5TeDdYK nZJWKRxJ3A8i7JtMyFwev5KDGuq5hSH4sII8z+lKD47alzrld4JA4SzESN/5xWU4Bmep 8YzQ== X-Gm-Message-State: AOAM532KGVfwK7LS+yTBKoM5KcX7Mxct05qB2NXgIm9VlLHKM/RoAPNM 6NY7bvPxFfphJ3xlAVVEsEqcFxHbLBGf8OdmgdygpaVLAMM= X-Google-Smtp-Source: ABdhPJzhbJqPrRFUo/aVFK97C7TX4aOOBTjA9JybHK76VJr83QScrE0ISYc+YuGasfOQVxAifzQkbKuldfuOYDFnAw4= X-Received: by 2002:a92:dccc:: with SMTP id b12mr1660806ilr.86.1613122256212; Fri, 12 Feb 2021 01:30:56 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Pier Paolo Grassi Date: Fri, 12 Feb 2021 10:30:19 +0100 Message-ID: Subject: Re: debug functions To: Bart Schaefer Cc: Zsh-Users List Content-Type: multipart/alternative; boundary="0000000000000f988205bb204be0" X-Seq: 26511 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: --0000000000000f988205bb204be0 Content-Type: text/plain; charset="UTF-8" Thanks, I'll check it out. Pier Paolo Grassi Il giorno ven 12 feb 2021 alle ore 04:21 Bart Schaefer < schaefer@brasslantern.com> ha scritto: > On Wed, Feb 10, 2021 at 3:04 PM Pier Paolo Grassi > wrote: > > > > I was afraid the function that call itself is the only way to go here, > thanks for confirming > > Actually, if you have the current development version of the shell you > can do this: > > function_name () { > function -T { > # original function body here > } "$@" > } > > The trace will show '(anon)' instead of 'function_name', but otherwise > it's what you want. > --0000000000000f988205bb204be0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, I'll check it out.

=
Pier= Paolo Grassi


Il giorno ve= n 12 feb 2021 alle ore 04:21 Bart Schaefer <schaefer@brasslantern.com> ha scritto:
On Wed, Feb 10, 2021 at 3:04= PM Pier Paolo Grassi <pierpaolog@gmail.com> wrote:
>
> I was afraid the function that call itself is the only way to go here,= thanks for confirming

Actually, if you have the current development version of the shell you
can do this:

function_name () {
=C2=A0 function -T {
=C2=A0 =C2=A0 # original function body here
=C2=A0 } "$@"
}

The trace will show '(anon)' instead of 'function_name', bu= t otherwise
it's what you want.
--0000000000000f988205bb204be0--