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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29978 invoked from network); 27 Jan 2021 16:45:53 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Jan 2021 16:45:53 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1611765953; b=TRAamTeg6UD/N2MUOix+wK3afO64nmuaAZYB5rR5JXSIzc5sawbdJR54sGNg2ySPzB9GSCZWNO t/tQUD5yCUX7fbyXCrTi+BhuOKX9b3YRWEnAmx4aO6Th6Jgmqav32lHeAkt4sX7XJg92GJxEN0 BJuOa53xV9UDvHWQv12pajNFpe0cauqxjXFjv8h2MYJPOUXLZz0OXu/ZADyJ+QT9RulXnkWwpy hFGlAKwJAnU2hXC2Rzns2jkaEe8fWOW1Bzv0wEfSmUsE3dd39DMWAmOPAq0El19wt2rBNEy1xP hxtybq6WHMW/RPPPzm2mEczomcOHCNEDhABszcUXK9Xb4A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1611765953; bh=j9ARcFciQMiaOMaierVLOlY3g0TuBtpPQkqN0PS4G+4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Date: Message-ID:Subject:From:To:DKIM-Signature; b=svlEdpzbZc0HtcVxq3WooZZOHEEJvQ0fwXuwzac8xX9yHwkQh7pjPC9XjWoHfJYgbpYFOpzLal YLl20WMbRFF5JYaF+4PARaZ3eXc4p1Zm8DFRAs7D7+cJWh7VKR56sTjw4n4sLTNSt5IvmXVFbp GQVGe4Zi84VTdY8MZi7XxStfvrPHHl/bNWd29JgnY0vHAcEWCXgcyMQX/Irm7Vb4Zpfs4HyBIg 03anYYF7h2Wi4v9Lnl2h/xs4xjoxWyeO7IiMZJNKe19eqLsA99WOqW2hxE3rmRXQoJOr7+JfVP or4Y51NKYiygrTH0TUci9sfeKv1ZBNDgARXNWQkWgD9y5Q==; 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-transfer-encoding: Content-type:MIME-version:Date:Message-id:Subject:From:To:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=9yWno9yvlMnb1mg62G3JSjuGy8fMaotMsUaODYmGNnY=; b=MYGZJpwF8NW23aDpnfu6gzb5Jx lY2/HSABid2h0R6nY5xXx5rImTXoaxFw0yiw0BQVKBZJg8ElOdvX8eZ+WHyUW6fKieeSIltBXo0hH WlfRSVPXkrWMsz0YVYVQkhZ6bNb+xlSgw6tQOKCA0kgyrs8jD2BE3kZt3Xp4+C0phGLdtX+p14c31 3ZwO6mIKwRA38CzKta+Cqg16Y3qi1M68tFe6JmhOZ90rnz2Ul7r3A3rlLosnI6UMkbncYh/JiXOxC gF5KTKaeHyikSxZmuPZnd6KpgfAyTELgmkeMOXj+bggE27drkJBGrFxSnrDae0pi17Rr+ljqBxGaP dhzuO4kw==; Received: from authenticated user by zero.zsh.org with local id 1l4nx2-0003yA-U2; Wed, 27 Jan 2021 16:45:52 +0000 Authentication-Results: zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none Received: from mta02.eastlink.ca ([24.224.136.13]:33649) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1l4nwc-0003b0-QD; Wed, 27 Jan 2021 16:45:27 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta02.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0QNL001I8JUFP9C2@mta02.eastlink.ca> for zsh-users@zsh.org; Wed, 27 Jan 2021 12:45:25 -0400 (AST) Received: from [192.168.0.2] ([24.207.90.194]) by Eastlink with ESMTP id 4nwalub8YsAqK4nwalQmhf; Wed, 27 Jan 2021 12:45:25 -0400 X-Authority-Analysis: v=2.4 cv=W6f96Tak c=1 sm=1 tr=0 ts=601198a5 a=zv49KfEsxEDzuN5AGO7r0Q==:117 a=zv49KfEsxEDzuN5AGO7r0Q==:17 a=IkcTkHD0fZMA:10 a=DxX2vFwecZs-gMxwOWcA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdekgdeludcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepvffhuffkffgfgggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepteevgfdtgfeugeevudfhleffgeetgeehuefggeevheekfedtheejudeguddttdehnecukfhppedvgedrvddtjedrledtrdduleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrdeltddrudelgedphhgvlhhopegludelvddrudeikedrtddrvdgnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: -100 X-Vade-State: 0 X-EL-IP-NOAUTH: 24.207.90.194 To: Zsh Users From: Ray Andrews Subject: detect pipe Message-id: Date: Wed, 27 Jan 2021 08:45:24 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-version: 1.0 Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 8bit Content-language: en-US X-Seq: 26421 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: I have a function that as used this test for piping quite reliably:     if [ ! -t 0 ]; then ... but today it stopped working.  I thought I might have broken something in the function so tried backups and it would flicker in and out of effect, work one time and not the next.  Searching the web I see that apparently the above test is not 100% reliable. True?  If so, is there a better way?  This is probably not strictly a zsh problem but the randomness of it working intermittently suggests some time lag or delay or something. Perhaps the test needs time to think?  Someone might have a workaround even if this isn't zsh's fault.