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 16915 invoked from network); 30 Aug 2022 01:32:20 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 30 Aug 2022 01:32:20 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1661823140; b=jrPT8LjmkLPjYGFcCmZ0+fkS0O5o/Xaff/NKfZ+G4tn2xKTRoj3A48sngA51Jfd+poIaEpDz9t A2vlqqsncjvhf0KJ5vr3txgsTEEYqtmMT03Wbg56S2uyq9fL96BhXpYVgIbNDXxN3lGlXPw+QN GvuEfOXidZa0glRFazVmZjORsm+elbNRZvgAQ1PVBU9SJ3SRhNexbzJTtbToMH3XZsgzG+PTWb JME1I5HQf/mzN5bJ/ONgTfLtOtsinqMUUlQT6DWO1QZ6HnuA8DHyvJ24AyUzh2NJMr1FjtFgrz +HoBMKfWlfAXpS0ORK6u+A1tqAWuZ7kR55Efwvcx8dUOwg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f46.google.com) smtp.remote-ip=209.85.208.46; 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=1661823140; bh=KsoNuB2BQ4aOJJeC9HjAR1il4tpF8F96s3VXE/bdj2A=; 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=ILX6+ODGi+9smK9XMz5bE2T4HKgFiIA3z16jpaYuxALabABz9GsGkuT0RWPbJ1SUyGKRxwlRAu atIZKAJOw97/DkKOt1yG1o66ybFwO9lj/14tdUSDQAPAE8R6O4B76F+Igevn59wwzHeuQ22m4P JmoSpvtTcm7r/sOIieZpA/Hfet7KONJv/vg8WEMahr2rNWvra+jHf/3YLcgd1LZ/7R4icBB6XZ AVo8scyQJdHw4H+0Qok9qhu6kpidKyft4AQU0kDIlB1ks1e5IYycGD9Wat2PqFBZrzfVchJkKS vQCEpfN71gR+hjKTdwhaXgJrGEvCXlzz9jyEdGjUBQRqyg==; 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=uMhRI6BwoczBNlwfQk9jpXY7yaWbQH6qw05QnFpYjNs=; b=SGQWsQ7/lQrWgSceDQUkXLbwAX 8uS96Mp3jeTV23AEwYEjG3z8/j+B+hUp74ZXloQR6HfrHuaeLELS1tqjR5XWSEeVyYmjT7OpfdNXF 549IpH0XQMDKUNm9WVf0ZIkRfH0bSviLdenA/dGftQQxReVry873w7YjpRKy4WDue9lssYfs3WuZt 7xQX5HUaQ793BVB0AXsmv66dXXn7F+Z/RDvrwLdR6vofC/XsIrghsT3PfLJHfI+u0HJqgHM4yLq0H m4YnzWkG78exTUiR5KHgc3STA2Z/o5LKAz2bNaE99yeHWH9OMeHyP8ob31Kz0SHSoiXHuy+WAdVp0 asNo2muw==; Received: from authenticated user by zero.zsh.org with local id 1oSq70-000Irc-Gn; Tue, 30 Aug 2022 01:32:18 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f46.google.com) smtp.remote-ip=209.85.208.46; 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-f46.google.com ([209.85.208.46]:38858) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oSq65-000HwL-HM; Tue, 30 Aug 2022 01:31:22 +0000 Received: by mail-ed1-f46.google.com with SMTP id a36so8454663edf.5 for ; Mon, 29 Aug 2022 18:31:21 -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:subject:date; bh=uMhRI6BwoczBNlwfQk9jpXY7yaWbQH6qw05QnFpYjNs=; b=rYERC22r+8Ns9G4K61z0mf/XvImVRC1KUYgshtBIsukPIh2T6ue2sd5KX5lzKlM1q7 OrSRPpMPNXU/NQYvMIvfyvQ/N9G9WatImfHOxsXtC4pITkrqRC3RtYpUYM1TWJq491DE xqWiPqBPQw2/EQNcJcfhCqKO+P5udvcJjOdhBlZLgoXx4pDdSsUHNA/kJajNJZ55AqGR tDZUOu/w4s42DJ7SlWlh7LyYaPBeQKjV9G0rnazeUfsvlSVERqGdhlDUYFcile8+dp1W 5A4F8WRvlLVBmLi2HmO0AQLHKt9b++EWXYhnqUutf0RlxDeCQRXI+UQW/7l8jbUA/HbY g0TA== 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:subject:date; bh=uMhRI6BwoczBNlwfQk9jpXY7yaWbQH6qw05QnFpYjNs=; b=GTDu0w6O9Tl+3w1OvkHhkbGlk10FCSDq4/ZMTVD6Tg3Szup1QTFrZUn4v8BfxzZ9Uu A/9r2yYCjHkLwLypcfYvQSn/gnM+yJlsg1P6XCAGJlY63Btxzwtjybf7z20WWpv4+HGc M2LIMwNHdA1Uf4s26rWtJYH9aVNFgl/ytgix3Q0EV2ZXSMS/UHGb5WsLIpTZ5eXxB0Ps W++UATmZ5xc2M0GwHQwGbRLLWLY/Lw0Nwbw0I34Ry17TnLgDOinfoSLvOR0BRg41ifip YspOWLGmIeCASboAs3GTsty5ZWxlNmcZPeiOU9zI4BV37hxrB35z0wSByQgVnH2UeVGz YlCg== X-Gm-Message-State: ACgBeo1io2lRW4tzAs089JCMxwLiDRf1DvXCPqvkVss8NKsjYmOvm3ut dvczVX6RmuadFElMaksDBC/9zhURcWNtBn+xKf0iCg== X-Google-Smtp-Source: AA6agR7GUwPVyf4DyDinRgNucDyjQHP2TSeOhKEF6HR7CR6CFXZVNlS+EQ4CKN2Y2DzS5g9CXFqsn+GtJEs6GtGHZlg= X-Received: by 2002:a05:6402:2b98:b0:43e:107:183d with SMTP id fj24-20020a0564022b9800b0043e0107183dmr18350760edb.366.1661823080849; Mon, 29 Aug 2022 18:31:20 -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: Mon, 29 Aug 2022 18:31:09 -0700 Message-ID: Subject: Re: Overriding "builtin" To: Zach Riggle Cc: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 28008 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 Mon, Aug 29, 2022 at 1:42 PM Zach Riggle wrote: > > Why does "=sudo" do the correct thing (assuming a sane $PATH, and executes /usr/bin/sudo), but "=/usr/bin/sudo" does the wrong thing (i.e., execute the function)? On my Ubuntu at least, =sudo is /bin/sudo not /usr/bin/sudo ... I suspect if /usr/bin preceded /bin in $PATH, you would not see the above behavior. I certainly can't reproduce similar behavior when using a function named /bin/echo to attempt it.