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,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9669 invoked from network); 12 Aug 2022 21:02:22 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Aug 2022 21:02:22 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1660338142; b=sgGdDpcPgfihZ35U6CbuVbin5aLb8yXsgIJkh4N/pYp1ELlkLWGOSndV8Ehfk7w3epbJPMCQaK gItzwrNEyzC3y9oAkN8jkORbwVM+a1KTbpJ9f8iMkfRRfu2ByEAK4wS/Jj/QLpbjwalMhKtqhC durzGC0shk/7JTonrxw9JUU92zPi8EqTdA0/PtAJqep5RRQ70v/+oClGYR26nD4h7tL+Wg9pnL 36g0bj+Ar4QcrPA31/0cWmWQP8bqGYV8Sj8shnW0Nh80LuWRqzmEGuAPrrf25N4LHZkIRc/G7L xuS6oVe8cn9sMO5CJk+JlEAepKCZbuu3f/yKflgMuBVwHg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f44.google.com) smtp.remote-ip=209.85.208.44; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 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=1660338142; bh=NMfiTm0VtoeodnPd+uD9g6Kg+TXO0MCpdyMXDuxbdBg=; 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=LBJmf8xa4VVKwplb1yaSK/UTfl7QxGAYtSdrOgGdtjM6+NM6iDv0cirjsFllvPoaZizJFNRHVd aIIMlwVxXhJOg/iceX7ifJZie9i5HEo8T/brOXhvj9aalUI/L9ERJe7FrsfZW/4wedSI3nsjWG th/izFSWwcvnH4gWmopikdHgvvIWJ9jNXeI7ijDOhO8gM6u385g/k7k8Cy/6pQyv89gJO7MlAa ZfTV2/bbGSKaFmqlKtmSjwGixVusv7war1eQnRuSW5uAPEbb9KJoPHREhRbaZtGpo+nful5fTT ozPThURcveGDDu+r3N+hIyxsYPeV2mRB1+F04mH+OkUsQA==; 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=cIglRRQ6E+T4LTtHq2UXA2xIrHWVX/e8tMt3JdBxOwU=; b=MQnI5k3FY0YJ/katXP5SbeUUhE sQK/f6LHbEqBjcknbc6oNu4gTeKSv9lTn0lgo7hoZLiEFzrn2FWDjwES7kujPbamMSC74teYdxCOx 46eszI817JMJlzVvNTnhGH4Zc2sYEzM5RxAEFKofcqTEbhYzug7Ybzr1iCT8vwwylWxJfqCGF+OGN EnGHdJmHs+LnXaIXC6vL+FarYRKysT+1JZ9rpp51a9bfSsY/R5d2kVhheF4cltYfAm/5MioMyL6ro ow+fIY7s2Woc8Zgo/7/xV3Cczrb9pOkp9hwn6bcJuJhZKV5D7IWqSWWeZQsY0zgNIQ6Fv4u/4Tc+k qASdF+OQ==; Received: from authenticated user by zero.zsh.org with local id 1oMbnS-000PSP-3a; Fri, 12 Aug 2022 21:02:22 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f44.google.com) smtp.remote-ip=209.85.208.44; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f44.google.com ([209.85.208.44]:42539) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oMbg8-000OY2-QJ; Fri, 12 Aug 2022 20:54:49 +0000 Received: by mail-ed1-f44.google.com with SMTP id z20so2689376edb.9 for ; Fri, 12 Aug 2022 13:54:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=cIglRRQ6E+T4LTtHq2UXA2xIrHWVX/e8tMt3JdBxOwU=; b=Y+qXKh/zIScHmsd6yvPZdsrYr6uMTv9BxT0ZMeMni1eZMsP/lssSwE0+RzUXxkI/Ib qR3p/NQ/3ZLa/HCcMttyGsSKq9DwDWAiTODsKdpwQpOamDlgjxpOdcJbICEgZ83Ftwpv /FIuoLMknKOOHFUcmkAmjEVwShRuwZxJi8yk9Qpq6KN6vGY23+tCwSfN3IGfxVY/vdGF lHIuwG3STA6QRbZAcxpy0naPKIpjzAtYz5Mv8cuTkHDniLWyEbIZc4G4hCgZXd55qt33 BHNBW2Gi1E1mXrSYSRZz/zmR3ZhcH3ll85p1YHlAHCNsui4wZt4PRAeVjCUrK5IRIPuM 2Naw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=cIglRRQ6E+T4LTtHq2UXA2xIrHWVX/e8tMt3JdBxOwU=; b=mlXBFEuLPI6QvnKeBP7ea9paEEa9sQNIcQVPfICmtDx/L96+hYEOxo2LEuAx+ykvwS crwXMf0cznWjSPVEvKrWFiD3KTT/FI6rngmcmK3iyTrj+IPwqYT0mub+SZ2UVW17uoBF KADGPGxLgRGF62lUvzETeDgRlEZvh7euAcnWVjboFaqadfOYeZIFPFx+Rw1OxJfd1D9X IYIzZjuk40E+4hX9lxYg9HYtLMnjjuS6LN8LG6HyJNifyJSSt4VGOJ9oy5QASCeYQN8I 2/5CSXJ4StU/T8+gcU82LfG97jkYbo/4RXPWOMgsdavGOLrDX8e9MrPt6aY7tK1qr7tc /sig== X-Gm-Message-State: ACgBeo2SDRuWYa8bJpLxZ+0lQDAGw2+NqsDir75GL90AmISPRHkuKV3h 4aAv2LOeob/kzwx19eiaXgWCHFnp71ZBAEpHeac4SO81R34= X-Google-Smtp-Source: AA6agR542kCgOdqiXVymG75h8ojr8wLIRIjfKuy9ISMB5rXF5cmhAAA37zqAeuFqIKJe3eISINNuIe7kSa1DpDgKp6Y= X-Received: by 2002:a05:6402:268a:b0:43e:84d:c5cc with SMTP id w10-20020a056402268a00b0043e084dc5ccmr5052107edd.372.1660337688351; Fri, 12 Aug 2022 13:54:48 -0700 (PDT) MIME-Version: 1.0 References: <64b57144-d4af-4708-983b-0bd202557bbd@www.fastmail.com> <4369c556-7ccb-4866-8e69-9d829afc81c3@www.fastmail.com> In-Reply-To: From: Bart Schaefer Date: Fri, 12 Aug 2022 13:54:36 -0700 Message-ID: Subject: Re: Overriding "builtin" To: Zach Riggle Cc: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 27951 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 Fri, Aug 12, 2022 at 12:33 PM Zach Riggle wrote: > > It would be nice if we could add a feature such that the "builtin" identifier cannot be overloaded. This isn't really feasible, given that we have e.g. "disable builtin" and "alias builtin=...". That does point out that another approach to bypassing the function is disable -f builtin which is pretty nice in that it leaves the function defined but inaccessible. Of course one can still "disable disable" as well. I can't imagine why anyone would do this, but of course disable -rm \* disable -m \* leaves the shell able to only to execute pipelines built from external commands. Preceded with a few "alias -g" of separators, you end up limited to simple external commands.