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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21745 invoked from network); 28 Sep 2020 01:02:39 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 28 Sep 2020 01:02:39 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1601254959; b=BvsVJ4n0q+acqIfP2gPhPVn1FpV6D6GZJK9byqrbzrw42+me9w2blhUH0hv5Lsj5vkVC6jqKa5 daWJMLLU7BCuoqjHV5pKNm/e5ma3yRDtCCvXeZ/kHC/z2rtxHyOx1+JI1KlrqvNIj5DVz/vXMd GSst7Tshdw6AHg/iB4RrU7gpEv5CJ77vA5ceEXVrKaJXl2KguI6py7ukxDjoScHoJOechtbnO9 ZXB2FwwRZsXdsNaRW/msfrt+XQKfNMsuPVeW8CurrWHjdkATDuuYEPCKryN9hNYp7LB7XfHa6J tv7JlfpKuatT6wN22qL/UvGStMNCTMGRVKfDZfsi2ky4iw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (sonic316-55.consmr.mail.gq1.yahoo.com) smtp.remote-ip=98.137.69.31; dkim=pass header.d=yahoo.com header.s=s2048 header.a=rsa-sha256; dmarc=pass header.from=yahoo.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1601254959; bh=4RljpKDeI/7pNHMAX9leWJAKQTp35t46JVpmA/CEPkE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:MIME-Version:Subject:References:In-Reply-To: Message-ID:Cc:To:From:Date:DKIM-Signature:DKIM-Signature; b=k9i+lo+mkRXOnH6DJ+XG2hG/TZqd8mgQCIydb7dYhX/lSm6yGCVI25h0Y8tc910zzI5za1RWwy ReMUTxZ6hbyvUgHkpQxWPzEGhca9TUUXa+f+C2z+tBxdOZLzjbVNCJppb0sRTIB9OgmYPioPYU wufwE8dldwTb+Dt5HFRzhgdo3EeznmXhVvHysMsVu6mX8k3rJDaMaqcRDDsfqz2l/mSEQfH5vW BEDiUd1yeQj1eWPOgqZo8xB0EzJYVwwvtvOsqEwEWn13BR+tFKS+sAjxAKSLy345yowe5MbloU JWa2ZqJ92I8+e0yil3dsnnM5MAAoJ4iBfviInNEQFC9Fzg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:MIME-Version:Subject: References:In-Reply-To:Message-ID:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=gBPSrF0+eDI4xUrEsfaY1/mApQfLGAf7prgT0vUpDNk=; b=TO4q4iw5vfXo4XRGVGdz20SHSY 0rqcRRmv6rBkYfXMngUI3uQKOdc3HoqWiqTHoLrxWR+rHszMVCxj/yO3+gjDthzbJrs4PExs6sBZI tiRp9G7gJzSUC7JYCSkYANrcHF/2Z+8P1+VW4ojPG96DqHUZKmOHVoZlxwoYXF8RFRhVkd91XXLqg s+4TjAe+fgWneQKgoSJBtkKplZNDbUUkrhASQhQlZ9zgArzr116IIU0X/AwErjyCW3ZNrjE1OSzgB T6aJAuddy/6rViMH/GVhhq05+uzZIJfYjrhy/B1+OMBaHYUtcndovGpplR5NMn487Ki5e3oVHPinW HDJPV82g==; Received: from authenticated user by zero.zsh.org with local id 1kMhYs-0008fa-T8; Mon, 28 Sep 2020 01:02:38 +0000 Authentication-Results: zsh.org; iprev=pass (sonic316-55.consmr.mail.gq1.yahoo.com) smtp.remote-ip=98.137.69.31; dkim=pass header.d=yahoo.com header.s=s2048 header.a=rsa-sha256; dmarc=pass header.from=yahoo.com; arc=none Received: from sonic316-55.consmr.mail.gq1.yahoo.com ([98.137.69.31]:40835) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1kMhYQ-0008IX-42; Mon, 28 Sep 2020 01:02:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1601254928; bh=gBPSrF0+eDI4xUrEsfaY1/mApQfLGAf7prgT0vUpDNk=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=Y5IYGuVviebNenHJHf8dXt9qHSDkaUmF+aKPdXuZePrBMfgmtoRI5Y/wsVT0dRZtu/i2nVOUYi99J/x0yzytWrbNt92NWaYBgUhuFMPdF7R7fTCmgIvnAXiXcmRsJX7BKbiXm3iKzSuaxi9cYf7kANhAsgIS57TOErCNegn8jo9aVmKmnb7YavdDYAqshc4m4Irbasdom1ojMLRWGLfbSEWjYW9CmHIzSKNm2dpNSQkh/CR4IpnEGqf4fstSthNsLbpzxxqNPjvp4aH6kCkYdFdcCz4EcVTTs/HZLPoOg+gV3y8GfhLHFNo5nU8jdSkvShlwzO15GICNt+0PQXHPyA== X-YMail-OSG: 19BPhdsVM1kHnY3yh4gKH5efq_s6.EX0xDOreoVzKCZ0UYdK.CwitQjslDVlCM1 zemJMHmFqVH2Z4nwM4GPkhhrR5fYnhCaLJtRPLSZ3LxmbJLewCxLWhId2GdHlqnFl.CUSx6yHz1p EdQ8fsFpPrUH0TwQp1oLlga8_DTy.PZaz52CgapcxzSt_d9_Rsv1Q93u5mzY61aewWvP6D9CFnmw WC.LOpnd6BW9Ytq_uT7Fv9wE29aVmcR7ksIEYQlazz_EbZwzKp9l8u2zv98caJMMZ9qY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OiEGyP0V3xES04fpek iEh8M_Sa7P2i7xTlyy7TrS.hjV.P_dK5JqpFrT3UFe_4o4ccT82jcMoYRaX_mqHVIS2HNdBP2M_S nmrhrt1vbrCPb372x3OiZZ02gyE6RdV9.THsU_nuK9gr8Onp4.sModeMfVAumJxBus_brv1I- Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Mon, 28 Sep 2020 01:02:08 +0000 Date: Mon, 28 Sep 2020 01:02:06 +0000 (UTC) From: vapnik spaknik To: Bart Schaefer Cc: Zsh Users Message-ID: <1678353929.1101107.1601254926037@mail.yahoo.com> In-Reply-To: References: <1846474183.1100394.1601253063804.ref@mail.yahoo.com> <1846474183.1100394.1601253063804@mail.yahoo.com> Subject: Re: Bug? piping ls to anonymous function changes subsequent behaviour of ls MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1101106_849580165.1601254926036" X-Mailer: WebService/1.1.16674 YMailNodin Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36 X-Seq: 26092 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: Archived-At: ------=_Part_1101106_849580165.1601254926036 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On Monday, September 28, 2020, 01:41:10 AM GMT+1, Bart Schaefer wrote: >Not reproducible for me with "zsh -f". >Have you tried running "whence -a ls" to find out if or to what it has >been redefined? Yep, it was aliased, but that isn't the problem. I've found that the anonymous function is being assigned to the left hand side of the pipe, but only the first time that pipeline is run in a new shell. Very strange. >From a new shell: > which -a ls ls: aliased to ls --color=auto /bin/ls > /bin/ls | () {echo foo} foo > /bin/ls foo > which /bin/ls /bin/ls () { echo foo } > unfunction /bin/ls > /bin/ls Downloads Documents etc... > # Yay! now try again in the same shell: > /bin/ls | () {echo foo} foo > /bin/ls Downloads Documents etc... > # back to normal behaviour! If I start a new shell the same thing happens again, i.e. the first time I pipe to the anonymous function it is actually assigned to the left hand side, but subsequently it isn't. ------=_Part_1101106_849580165.1601254926036 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Monday, September 28, 2020, 01:41:10 AM GMT= +1, Bart Schaefer <schaefer@brasslantern.com> wrote:

>Not r= eproducible for me with "zsh -f".

>Have you tried runni= ng "whence -a ls" to find out if or to what it has
>been re= defined?

Yep, it was aliased, but that isn't the problem. I'= ve found that the anonymous function is being assigned to the left hand sid= e of the pipe, but only the first time that pipeline is run in a new shell.= Very strange.

From a new shell:
> which -a ls = <= br>ls: aliased to ls --color=3Dauto
/bin/ls
> /bin/ls | () {echo f= oo}
foo
> /bin/ls
foo
> which /bin/ls
/bin/ls () {
= echo foo
}
> unfunction /bin/ls
> /bin/ls
Downloa= ds Documents etc...
> # Yay! now try again in the same shell:
>= /bin/ls | () {echo foo}
foo
> /bin/ls
Downloads Documents etc.= ..
> # back to normal behaviour!

If I start a new shell the sa= me thing happens again, i.e. the first time I pipe to the anonymous functio= n it is actually assigned to the left hand side, but subsequently it isn= 9;t.
=20 ------=_Part_1101106_849580165.1601254926036--