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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18272 invoked from network); 11 Aug 2021 17:52:36 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Aug 2021 17:52:36 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1628704356; b=LiVXYsNPWJPDOltXKn6TXFgtH7ca7mUUxtGS9AC/4uHIP6Ao7isAGpOOXt5GbiqL+0EV0Ceb3+ pGozPy634lpYN0+W9gKicPWo4IVYii3lc/wnKWOmstUWr0IH0j5rLE/9K0/1WQ8910ACG5u1X+ KWOTJui+kMcf29vHsIp46jv7H1pb3LTqebG79jSWBnxiPg1jyWltr1igteBd8P7PTPIshj22IT YylElYALLx/SvpNmSmLo713ERQjMkp6gac85KqWGGTXRxoClAYRjSzOrGeHyjAlovFO/82xaZf i2KHXD1YSAC6BXfc6ohARDmXx9iOk1U+pR0QJ1AHl+n9mg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f171.google.com) smtp.remote-ip=209.85.219.171; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1628704356; bh=+7XEz91aBTgDm8fmXLtOY5x6oWg7vIDTIy2isvTWeOo=; 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=Yse3X65o5QqYNml7qtnhx4geHu2MZTwaK5+7KDR3ud/SSJ5dbaiM6zgDfNN2LMFly77ZYiFeLn N2xmtg6zZx/b3qjjmhqzvkXpgXyOSX/Ms0gumIiqPiLATPOxr7LrX/rn7raMvHEzXBLALfbcwB C6CMd8Axu9HWbfxXMBEIZBIO1maEIU/o+bwZtW1MIpalitJ+eTBQ/w+8AzclS8WZrI0TrD+c0T o9AAN741VWxGVT7ZYqh1xgFo2Pi2UZ5NndMPfSA6mOYMdzLvHp+PeClSbWdNbzliXFU/MMNgMq 7lqBlO+KvHUnNoZP6wJIkJqidIry1zXBdD3zhm7rim36OQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; 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=O8F0ffBy+lnNETAYg2KeEfr7CAFDVf+g9gmUuedBZsA=; b=CD0YJpMYAs1zAnOmH6PUSFK49h A0C8GiL2Fs7iTtZfmGOonO8Ur7vZT6agWxppfC6naGMeqqTi6KSVPGaGfjUYbKxSruLyMtufQ3a6Q fiRYk0CYIkrUerWlddfEsQbHLj1JSm1ImA8jY3LGhN9sLqaW26rcTbF7Ux4o+EK64gO2czGst2Yb/ +DzOiK+ao4Tq7ZZ3K3Ko5lvCSn1A+dnt6d5B2s+O4b5JA28DhHYQsV38WtzOIGTFLKK99v5UTuEcA oQNxQU98Xg1jGBGCaa/9RSkLZhWczJDR4tUvDlV/nNziAlfVHY8IsnYJgaxapfEOOWNZ6tcR1IEgD cSUDUYJw==; Received: from authenticated user by zero.zsh.org with local id 1mDsP4-000Ew1-5M; Wed, 11 Aug 2021 17:52:34 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f171.google.com) smtp.remote-ip=209.85.219.171; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f171.google.com ([209.85.219.171]:43873) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mDsLZ-000Drz-D9; Wed, 11 Aug 2021 17:48:58 +0000 Received: by mail-yb1-f171.google.com with SMTP id z128so6204033ybc.10 for ; Wed, 11 Aug 2021 10:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=O8F0ffBy+lnNETAYg2KeEfr7CAFDVf+g9gmUuedBZsA=; b=gTiCAIL/Qgq2udzluDWUg6bzB4/huQK0bUJN9cLwC0NVKEC2rUQ2j/EW2BaGbuNyyV qRjHVTCBWRk/rQQMi54YfsLpMaoygIQ0qKxZ0ZvnQTcEVANO4mvdE7UTCVSu25FHpya7 2KVwvh08MPoOO4fHsaE7gSomz0EsGgUg6p5ZJGFtKEH/SPUOyYzkga1olFUYkRr2XF2V 0vOr/Z3w3t9et1Ug1XKy+NegodFYY9ngLb80Ff3hSSJk+AB+M4XZpLREKFM+lmirI3a1 S1h3FfOdUwN7EZYHnuMfBPKRfZC6X2S1YmldwcTKIYjkpl5iLP//qVAXAd65hHCo+XhD LE+Q== 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=O8F0ffBy+lnNETAYg2KeEfr7CAFDVf+g9gmUuedBZsA=; b=gs2gubmRp40c8J6zN9GetkWHfU9C2u+GHv8mEcETHdS6EnoDJigwjN2CCQzObfv7bc 4U+OwHWyYgyuPHfTVkwkwiiGm/bSB6FpHsAIdrStPHkkVK1MqeA6MFihkD2v9NHzUDHx Op5CZBykqcx7DonbinS1QVRa4nmOFluvRer4ITIpQ2OOh29MLnuZm3A9d7rsaOXUIkdX iIn1pnUUIlwf6R1Ru2MG77X3MfIF9AObAy0vAqXnzr0GqVTRsLXJ1eqeR1NhLHgBK7uX TR+Z1W9uGtbS/fWIx9RzcSwoWaNDbnOPQNhJa2ujTZYvnhcJsURExjYD589yoXzeUWhR +98A== X-Gm-Message-State: AOAM532H1fcdKyQTADs5/TNDMM/SFBjpDubsNybdQe6mxQi9pqlTmgW/ yNA8FVxepct6dbIMM74IKpdLeiG9dh3uGOyXAzzJbQ== X-Google-Smtp-Source: ABdhPJxT/S5bPrkiNEAIVBYMJ2gR/KEX5CAEYZ+C/9vAJtpD33r4pfy8wxM2tn8zEZh8J9EAFafOCGSM8gcaWsqgCuk= X-Received: by 2002:a25:ad67:: with SMTP id l39mr3803682ybe.69.1628704136021; Wed, 11 Aug 2021 10:48:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Wed, 11 Aug 2021 10:48:45 -0700 Message-ID: Subject: Re: Preventing xtrace / -x from stepping through function from autoload'ed module To: Zach Riggle Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 26912 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: On Wed, Aug 11, 2021 at 1:36 AM Zach Riggle wrote: > > Documentation on "typeset" indicates that with the "-f" flag, "-ft" > should turn ON tracing for that function, and "-fT" should turn OFF > tracing for that function (as long as it is named). No, that's not correct. "typeset -ft funcname" turns on tracing for funcname and for every other function called by funcname during its execution. "typeset -fT funcname" turns on function tracing for funcname only, that is, does not keep it on for other functions called by funcname. Thus "typeset -fT func" will in fact disable the global xtrace for other functions called by func, but not for func itself. Those other functions may of course turn xtrace back on again as a consequence of "typeset -ft" or (inside the function) "setopt xtrace". Note in the example below that functions -T innerfunc disables tracing within bottomfunc. % topfunc() { print $0; innerfunc } % innerfunc() { print $0; bottomfunc } % bottomfunc() { print $0 and done } % functions -t topfunc % functions -T innerfunc % topfunc +topfunc:0> print topfunc topfunc +topfunc:0> innerfunc +innerfunc:0> print innerfunc innerfunc +innerfunc:0> bottomfunc bottomfunc and done %