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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18537 invoked from network); 11 Aug 2021 08:37:11 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Aug 2021 08:37:11 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1628671031; b=YvAW6wUJF0XMXKeTWbg1/QSnTumSmT2wlh5YU1l4/6WcC4rVRoejVfs6Vk2QHxwPDMROkdk8Ij p+WHLjWVXKX90nRRHIDadoNTWzldY3k/ktLyV1OXPrhw0/u7/eOy0gQTKBYTk118k+lKRWkB2y 5oVFdQ8qjg92vFA5UDR+PRQ4xzJVn+RxaVqC9gZWxQjrjwgVuwOVJf+Q1NgB5ZjQo9VdeZWGi4 mBevyuyuWbuHY+cjfZAXneqEFo9bv5U7A4v1MJn6eWJeqZYO4OeHhCcBfscYmogTpcp2Udzmnv 4oCZv9lDZS1MPzlExAAQ99w5/8bCY+michLrSorMMmfcrg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-wr1-f49.google.com) smtp.remote-ip=209.85.221.49; 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-20210803; t=1628671031; bh=0fWQrnrBO7Eax0Rli1zL+GDnkJWKKA9aMNRsn/uT/l8=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:MIME-Version: DKIM-Signature:DKIM-Signature; b=Vud+vIMWgZEROXFWbNDgkPVoR3cJBS9B65qzC7VYJWEpXpdxl+L7p7cJ12f4CMA+XZrdHeaJMP NEDOBiNgM6adm+zMjxR8uPxHorCPP0J+x8Gb2NbWVbJTJriWxfrYGr4bB7YppdkRNbaWNdw+XK D71/mJPPN7bQYe4nffDXisTGccv9XaM5Na4Vs0GGCbrvUUxyQYNeB5qZ3KxfcAIHPrlWROeJyp KuhW01wBverVKzz5pZ/gBY8E4UJXGGIrdE9zcoxPajGzeAHzsLbYmxBpfuXM7TZmK7jnyIcGWS 2cjuCri0K1sVwkx9ARR/O1ILd9qdyGfZWxEyy998BC5qIg==; 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:To:Subject:Message-ID: Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=ZPaypTGpDXSI6Xao9lO3pOzA6Z/+Bgq+qA3UeRASlAY=; b=J7xh4gBJe4ZIC2TuPGaWpqZ/CE 09P/Qp34s3cPReDhXjproKWJoRamR+QoXpoOe/tZORSIPJJa37XoJJFc3k1DSij40h4dDvlpXJkcf LugWVq50HScwWFY1ngwTE7+cFzVYuQlOFGE+tlfkCVeR9XfCixZKaRqETiBhV3OO38pGM+w02btVQ cR1pbxkdOmtTwRrhp+c+CGYcLsFFxQVJ/d3bVvaHFaJ9MAe+22HpODms10zgw8nzjuWxjTDr8uejU PqCzpMO4HJGMUVyCSTaO4X3dmYML7Yfl0Qax2FtiD5UeKG5VQiLrp8uiVQ4Hm1pwiq7sPJtOvytPA 5sRUkL5w==; Received: from authenticated user by zero.zsh.org with local id 1mDjja-000Hm9-Qr; Wed, 11 Aug 2021 08:37:10 +0000 Authentication-Results: zsh.org; iprev=pass (mail-wr1-f49.google.com) smtp.remote-ip=209.85.221.49; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-wr1-f49.google.com ([209.85.221.49]:47085) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mDjii-000H2J-Sh; Wed, 11 Aug 2021 08:36:17 +0000 Received: by mail-wr1-f49.google.com with SMTP id f5so1856318wrm.13 for ; Wed, 11 Aug 2021 01:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ZPaypTGpDXSI6Xao9lO3pOzA6Z/+Bgq+qA3UeRASlAY=; b=V0vSYX60DdwsiIizMKWF2KJBCsMEogXXkLMGpe80oOY6Lch7AJmVOOLy7hSIg1m0tJ epSguznUEvweLEJdb3ubhUUNH5ai27tEi1WFS1o60FEC646FqfUkfMLGPU+ybvM6Ku05 sPlBp5x+TK74y3h2XUMTCj3xmym+VCy74qMYNrswLBSNmLNKnWkPulHDo8JnXMkmSeas 1mIWuaRWZfJgt8s5xl6GwxfR03HASCj5oxt8bIhWRwlCxw/Bw9TepoPP90tLmOV/WMcF Kx1FZ/XhF+YjpHUYo3LsU8jJVCKMJ7eXdX4ytDeNOqf/2TGd8MeLrE5QbNxCwUCcvOiB PXZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ZPaypTGpDXSI6Xao9lO3pOzA6Z/+Bgq+qA3UeRASlAY=; b=QDqqR5WFwPjD7Jdj2Xbf50ZT91weG79DPwXYfweZfcMq1YA8aETV6/eOXaup3zP1Bn UzpYinlZv3pEA5kt7DnMF8o9UXivzTcc+LWq4E2A9Kfjq4X5z/G6OQSepMO4WUiKbxMs LR/zzX3uo5uyCjZIfVSDKMDkBxOwTyCp6VjYt5IW0/gH6D5T4qZGRqWEWu3vdY99v59H EADCI7w3se8gcIxp3OFxj7IPBW754peGIY+r3eX4aORAzlOW8v7Ln50jAq4JF1KK0wko BGkh/DejRhxgQWRjWXe4YRJAY9YTT13HCYgNjxulwYOlEy71jH+X0EEYs29Z3Q4vxdzs IGqw== X-Gm-Message-State: AOAM531aUndYncXN6JIYh4SEf9HH0XBX9Xb5IftL+sv9vK607bg+t7Vc RhMDbEctZFDHv2d5vsuPTMrleZv/JSvVGEuJwpHqUZh+Mvw= X-Google-Smtp-Source: ABdhPJy4ItD2f1xZhr+9H0/Za6OjAjekaD7sJ7lIwQMG9uupQgjL+FZGSmUNB2DSS7fKpA02PWzDQOeMcMJTyLdIqOY= X-Received: by 2002:a5d:61c8:: with SMTP id q8mr35053268wrv.151.1628670976106; Wed, 11 Aug 2021 01:36:16 -0700 (PDT) MIME-Version: 1.0 From: Zach Riggle Date: Wed, 11 Aug 2021 03:36:05 -0500 Message-ID: Subject: Preventing xtrace / -x from stepping through function from autoload'ed module To: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 26911 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: Hello again, thanks in advance for the help. 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). However, quick experimentation doesn't align with my reading of the docs -- "typeset -ft func" DOES work to enable tracing for that function, but "typeset -fT func" does NOT disable tracing for that function (when tracing is enabled globally via e.g. "set -x"). Are my expectations for "typeset -fT" out of line? Its inverse, "typeset -ft" does seem to work as I expect it to. #!/usr/bin/env zsh # Turn ON execution tracing set -x # Turn OFF execution tracing for the named function, before declaration typeset -fT hello hello() { echo "$@" } # Turn OFF execution tracing for the named function, after declaration # (not sure which order is intended so we try both.) typeset -fT hello # Testing shows that "hello" is traced, which is NOT expected hello "Should not be traced" # Turn ON function tracing for hello set +x typeset -ft hello # Testing shows that "hello" is traced, here as expected hello "Should be traced" Zach Riggle