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,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19220 invoked from network); 12 Aug 2022 01:20:07 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Aug 2022 01:20:07 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1660267207; b=MdM+9Xk91ZIm/I8CWc7FmbENKE553vVfl34rtl6/Z8scDkIL2CpjUNaYWtelpoaG4YLTGwbrd0 MYibI3dxvNX+uEDqeFUVNWi7YdTCp0Haojh/8J2b4Oaz49X9b7E+5on4As312y6DdXDjW4xG6M oz98AfPNBF4ulK1ZxOftrU85pQxFmHjQs7CwKEGtJpPAtLADbbCVb5v/A0MMvdiParOfldfjpd fzcpaOzVXfHyeuNU66h79nR85/9yRyN/qnNiuDfrZdAHNc2id97y1q4ZwHiRkHfd6O4Nn8mawC dzncQmy1MCpXWNcfbKVX2+fD4DdvctjaXCZP43lL5q7odg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ua1-f45.google.com) smtp.remote-ip=209.85.222.45; dkim=pass header.d=gmail.com header.s=20210112 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=1660267207; bh=+12tLLJanhbYGdT6UKrQQX3GhTfGUwi4ePF80e8goRA=; 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=ejYu0YM/yaA7xBh+J0xhO3bEE8zSVTUyqOUNEnIC+VqTTRYPsIEturh5hJRvjd+vcnY5dmBxLl COSu+HFhIdk60qQVREpodurK1OK35yEVVanICPVaehR10fl/QeTcRiuBz7mBFLQzIuW4FmmrIH rKfWZpjrI05FK543XPZaG5qT85vt4EsYCj5a+Cd7zpPdUEnLjUxxDBVjaC1VuWwV41sz2kSjsO jKH+ZJHJa7kQBlek/NefVtstiymu+bTNwNPIJRmrhkUYdh+B2KFynDpN0S+cFacUWMmqL5/2Kh BYkGkIhXmTDcThFcvtVjJMgC9fMdceTBrR68bDYoJGAk/A==; 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=yQECiCRYFdqDtGjUZHpFdeZt4q3u4n957oD0Ag/sE4I=; b=eAP+aPHSZm5fn86gYqGtm2v3oe I8YXy5HO8mGOddiQFK5G6nglLKpmcUA2A/yIfZqqivC/U8+ljYGZ2VjUDPNdVgRl14ep5Q0qO278r dwjn8mr873zxDR9dRlHgW+6oHJgOPcB/ZjhNX5i551ALxepuyoKC1jD5z84tpgDE85PfTfzsneZQY uJauixUCR6AU7ZUGiTVWfmYw8HmpKgVKCJmUDeOzHnTSAzvCe7fXHx8TBH+ZJGPs7dHVdpdaoKmjC JS7eko9dtSkNhTpp7pjNoISSW12OaXbwXnPRNtEeIPyzXk4xsu+yYU0eH0chK2uU6XknbkZtDCQIu DNQNFouA==; Received: from authenticated user by zero.zsh.org with local id 1oMJLG-000B9Q-6N; Fri, 12 Aug 2022 01:20:02 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ua1-f45.google.com) smtp.remote-ip=209.85.222.45; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ua1-f45.google.com ([209.85.222.45]:45604) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oMJKH-000ASR-Q0; Fri, 12 Aug 2022 01:19:02 +0000 Received: by mail-ua1-f45.google.com with SMTP id f15so7556082uao.12 for ; Thu, 11 Aug 2022 18:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc; bh=yQECiCRYFdqDtGjUZHpFdeZt4q3u4n957oD0Ag/sE4I=; b=PF+KS/uYgXzXJSB3aKEpMqsl134zPF+kTJmwEEEI28hsUMl8H9/dvMnB5fANyFWG4F pDRWOD1GBpq6NwePuwewelc6dZxgUhxs3fPEVwVQ/RsNOoqUY8atDrVYlEo0+kN9vd3C ETrHRE0kdu4fld5ltMZO3lIaxpPFVdVmYmgo+rsFwrkhSyfFX1Kybdzd0WwUJBI5DkFb C6N9tw67MqBT/WBr94sZmvhsqc6v3A1tvMATyRvhNDiSRSSlaLhDrvbCvfplUZE3JfBo dyNrMvfpKklTI64OXwf/auYF0tYpxov8twJdfvAcq6f/T2suv8vBNqdUjlpEVUTmpfBf US7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc; bh=yQECiCRYFdqDtGjUZHpFdeZt4q3u4n957oD0Ag/sE4I=; b=t5n9fts8VCcdkWx9EH2M0Sl1w/0Sqcct/53RO56WDa1sUvwyf/vZ/l5VASpE45yqLX pBJ/jChY+W1Lyc/U0Yzl3Y12AV58cRGduOnFUKrKSwHAdoyGJpi1Xlu0iYscL58LmwlG hrNF+IZ9GvHqZez8G5nC53B0oN0XGVXBH8ZYeI8Nt6qgKSmBTpOcYQfDN9xEAVjDtQdJ UQ4nmM/jxYDLQeO5BN720StgQbCSiEN2gXbFXVfHuWExGLU9xqwX13vqygjrjCOaKrtY XF4OLpSqsjQeGkgTCWKFT60YrRDRNWojkPGj3KF4IZnSMwvBy6anh5tkEi1Gw8d/EDsf 1JrQ== X-Gm-Message-State: ACgBeo2mAaO+jwdCzLjwy6eruKoIOotimwQXbZ09A8YmNJoUERxLBhyz 6DnljZmnD5DfOQkfIieRxMLm5ttTk/GBsEMOmRuVKzv0Eo4= X-Google-Smtp-Source: AA6agR4C0FHM3B7jdY2aX2erViykJkIHRdMDQqmQK6mcOxUgHOLw1lSE8b11sFkg4VxdTDy/deJDxLw04tqsJ9DNCNE= X-Received: by 2002:ab0:2a8b:0:b0:387:3315:c506 with SMTP id h11-20020ab02a8b000000b003873315c506mr946269uar.20.1660267140455; Thu, 11 Aug 2022 18:19:00 -0700 (PDT) MIME-Version: 1.0 From: Zach Riggle Date: Thu, 11 Aug 2022 20:18:49 -0500 Message-ID: Subject: Overriding "builtin" To: Zsh Users Content-Type: multipart/alternative; boundary="00000000000023a25905e60111bd" X-Seq: 27941 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: --00000000000023a25905e60111bd Content-Type: text/plain; charset="UTF-8" I recently learned that 'builtin' can be overridden with a function. Neat for some silly tricks! However, is there a way to save / restore 'builtin' such that it can be restored? All that I can think of is 'unfunction builtin', but 'unfunction' itself can be overridden with a function. Any ideas? *Zach Riggle* --00000000000023a25905e60111bd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I recently learned that 'builtin' can be overridde= n with a function.=C2=A0 Neat for some silly tricks!

How= ever, is there a way to save / restore 'builtin' such that it can b= e restored?

All that I can think of is 'unfunc= tion builtin', but 'unfunction' itself can be overridden with a= function.

Any ideas?

Zach Riggle
<= /b>
--00000000000023a25905e60111bd--