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 30804 invoked from network); 28 Jan 2021 20:58:54 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 28 Jan 2021 20:58:54 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1611867534; b=e5IECxAuxX4MaT+gdQSbc9aMsXm9S7oxIA6MD0PhO7pYXhWN/b2pr6zu9mXpHMaRq7OzbpGgIN qugfzd3QWI+1lvr3uu+zK0bWDJjCp0m9A26vW+CYGTMDQtcjbnFl3cNbhMA2dOcWD+aEvMUBWi kfa2itxesFL5iowqlMYIzVFMtT9zch8MdBJLsoXinLYe9viunthMkuwmuZ0N4z/rVTat337TJr dDVb2jTheFb34JT6lv2ZOrcflocEIUDj+USpw/1nlxWCcew16PB3ntktU+aMyA1OcpcGdCDMW+ d5f8wvEg7DXgzVgFVETKsGJj4tOHS81M1XrHG2kk7zSWtA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f53.google.com) smtp.remote-ip=209.85.210.53; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 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-20200801; t=1611867534; bh=vfMcjr0qciZQFRWUNgZiZCc/2hEFzprGvAyBwN7WdbE=; 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=M+C5HICx/EpItvNXQ46VgwvJUmR3Ll4mahexykADjKlO+y4g7Ep/FOv4WRNsiEssc9jiqD+Rmw aMi5yNbwwO47Z1fiqd9VBU8u//RKpGY7KdgWngPcXbKYSBELH1pFKBHhOkmk98JUdXZAhnnTRd qXxXf+BcdF3ZFXnqMYIN8xi4Fqe1ZlpxpE/yYpKP8nNFTW+aYhFOl5mcyKHUBQEdDhZTKqyifK +BxWghmbVgqPgvJdeybTZdNmWw/mX+z4pEki2NtTNEdb5qtBXlOzzjAMBqoH5RgSQHLmZp54w2 9U3m0Hm1hPwpMzi4S7pqGq0zoOFZksDEoHzWt17OggvkpA==; 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: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=JvUPTxxu2+1aCvoRAoTrawlJrkSzGEq6LWwDVB32Oow=; b=xWRWVe44sJLxJCM/FcaHeUrxsN 6NmqeQuSFIKZUCIq4TDEEEyTBQefyw5kC6zSArQ9e0VcAb2y3eIf0JsTc2OLPAEZzmrgtMXUDy6/X opDKkhBl34vmCajEXMBF27HU47cJKQ7DZDl3KQhMLxpDXhe1TmxX+SYzG+PCnPNayFhNNPoMRkh4s Al4AQPfVtZfbj6YBFKcRhUSC0B1wpqm6d9yqmvBw3liZ62NTgj6LV2plkMxF1TdpXLpE93Fxd7Dgq k0krHSjrivFSvkk2AntCDL6IXNlqW1I2A0EDwU57cZiidQcmedt6pBU0FdaBaRPUwEpuXDbVlTM8l Xq+XsJug==; Received: from authenticated user by zero.zsh.org with local id 1l5ENQ-000NTu-MG; Thu, 28 Jan 2021 20:58:52 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f53.google.com) smtp.remote-ip=209.85.210.53; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ot1-f53.google.com ([209.85.210.53]:40041) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1l5EMv-000N6p-33; Thu, 28 Jan 2021 20:58:21 +0000 Received: by mail-ot1-f53.google.com with SMTP id i20so6567077otl.7 for ; Thu, 28 Jan 2021 12:58:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JvUPTxxu2+1aCvoRAoTrawlJrkSzGEq6LWwDVB32Oow=; b=bketkW8XUpKKoOvJ9Lw1kof1xxeapTZrpl1aas+Nk2BrAxfLrba/T6UiuxpbKsDRnT 5sMsEI+Rq93/qrp88K+l76fggguLwvxLjnak2xF5HWW6/6EtD8l6u/ltU3JyoqbZKBAG 8Ue/WU/lpJBLdaa1lW6659wp4nUEug6SJXv6/mAbuIMrtixEJpiTL/Jol19hs4r/YzZH Pi/qMST6Y2Wxm587o3bT58G3QO1Bh8C7KJhsHBcf6lig9xwi9sMil6u92nNw5Ky08f+K 1LkqS00HFI/81fuZTOGAsFSwj8mC4r3BCDY8HutTRGYxnbr6+Uo7xqN94coTspVR187g 6Teg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JvUPTxxu2+1aCvoRAoTrawlJrkSzGEq6LWwDVB32Oow=; b=Ad7S5VLPVXFzR8x4DtJLSuuVFALVnrzIDaDzx/pWmjGmrvuzaMuY7w7KSzRYOQ3E8x NOo2epeW0y5zqZEIVZne9hJ6PTomwHlzvVOxcQtbg3D8B5K8rYtPmf2Z7i7XRFnKy3KT kfY87AFRNG39Plkb4dBWeVNJqmjvFrGBN42izywJSOjEkhSqboJ+It+I73ZeQujGQTf+ Cr5YboUNt6PFUCqS6IRBiWC7KZO9tlXAai351CE+poTljqdaCnwZaP+4OdmrFd1pQYvR m2Y33tchWty9vmVCTtSUDePWJ7tyikJ7BQJRxp5FCZsWKihtx8v67pYKgPU30rOogfIs KJ5w== X-Gm-Message-State: AOAM533HWVAiOw8JowvwFeUFp9jYX8WBoFHf5kfgdg68JjcehMViPA2c MYVGko/4qKb3Gn06zL6s62y3dnwBCRNXjNTrOyo4SQ== X-Google-Smtp-Source: ABdhPJy0Z5e8ixaxOFMjBwM0LwG2E8pcjzvADNaQCBXbftqvTETfGebvSQ6H/nNwVaNL+plybulmjUy3hU6YZqxcTjo= X-Received: by 2002:a9d:701b:: with SMTP id k27mr871619otj.161.1611867499698; Thu, 28 Jan 2021 12:58:19 -0800 (PST) MIME-Version: 1.0 References: <1b788ada-9c70-78e5-cc2c-1943000f2994@eastlink.ca> <20210128100858.GA578422@zira.vinc17.org> <20210128102816.GB578422@zira.vinc17.org> <560cef52-aee7-352a-2ba3-25826fe54136@eastlink.ca> <14ce37b2-35ca-6002-474a-7de5d6626a66@eastlink.ca> In-Reply-To: <14ce37b2-35ca-6002-474a-7de5d6626a66@eastlink.ca> From: Bart Schaefer Date: Thu, 28 Jan 2021 12:58:07 -0800 Message-ID: Subject: Re: detect pipe To: Ray Andrews Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 26429 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: On Thu, Jan 28, 2021 at 7:45 AM Ray Andrews wrote: > > On 2021-01-28 7:05 a.m., Ray Andrews wrote: > > Delays of some sort are part of this almost for sure. > Something changes in the OS I think. Speaking of that, what OS are you using? > #alias g='tabs -4; noglob _g' That is guaranteed NOT to work. With that alias in place, your pipe is feeding into the "tabs" command, and then the _g function is run with the regular shell standard input in place. Aliases are command-text-level replacements, so given the above, % echo something | g other is the same as % echo something | tabs -4; _g other which (in case not already obvious) is just like % echo something | tabs -4 % _g other The only way that would ever report stdin as a pipe would be if it appeared in a compound command context, something like one of % echo something | { g other } % echo something | ( g other } % echo something | if g other; then ... fi etc.