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 13155 invoked from network); 21 Jul 2022 00:24:04 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 21 Jul 2022 00:24:04 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1658363044; b=YGcoxloIocgv1mopSlUh0YetKuhEaW8SNYpQxb9rqQYXUGqEm1H9ZuvK8HxLHNhK/AB8saabGv L8ZtpTDajeeRCf5oVX1x0KXdNW1BA+fHeNTtNRvEQGhi8PlZUavCeBa2Tj6JXQoSk/v1s4h425 /EZh/VAukXzsN8Qjx9lhBQxaeFO83csEoVwGuOWjnHxVCAfgan5P7i/Jsw9Ku4haag0m+UNtl+ mSWZW7ZdeUzkYkFRk16PwzknEoJQDVrii2Wc+ced1HH0l7fROiua6tj+qW+MXxGtfRghEcGAmq QVabiVIZ2VY9XvIBANTA5/EQ3gAoYGkjzWuAgS+J5B+R4w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (wout3-smtp.messagingengine.com) smtp.remote-ip=64.147.123.19; dkim=pass header.d=ajrh.net header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=none header.from=ajrh.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1658363044; bh=s9NEnwL3CNdgyY//iTc9xnGH+pRyqGRDICc0XVI1U7A=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Subject:To:From:Date:References:In-Reply-To: Message-ID:MIME-Version:DKIM-Signature:DKIM-Signature:DKIM-Signature; b=UmS/3K7WC57YxXtvSzIZHR1A+OQgdaeJkjNRJkawYy7N0kNxyrFnD5FVg+2Q4cES7ryeHJQ4JH OYrG78wTC/LTlbrqAEt/12myHP2QlNUKBN5z0mmS1XjqN3mBqap/DPo5qO9QRg4CMmX10+qJW0 X7+SKv4uNk2W0Sa1z4NPKneWHxkHAQr+ZLoXuz8udbDo8sCDOm4gJu31QbUumthpizt4qnI5fC 3ZLLubuKReAqVnSgP/gBvqr62VPRWu1cdTpPAWrWWoiPaFzup9m5ZjuNw2BIOqspy7D2EXkTz8 V7nt3KIYCYq9OWPt9gQSjmYxyCU9MumA8xfTtBBkaJm2yQ==; 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:Subject:To:From:Date: References:In-Reply-To:Message-Id:Mime-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=E6KOE6uPo0brgcKZiCIltuUk7TP75Lr+WQ8PHGMx+ME=; b=dU3Exdpt6n+xFFECLziy8A275w /Lpak4ajIoisZmSlYiAPZkKVAuzZLW35TmjTzVFZctfcNLnn1NwLFGg23gDOTeqT86q8KZzLaeV5s S/EjFxBz8qRxozG+28KVwtXaOHki73OfqYwww5ax2879fyZBqFOnEZTDskOhg3lNPn2h/cpGkzRjI TTV12UxewMSQPh/S+Y2LEzMlGwqCtgTfx/axUC/NnwNK6gWRlMxpIvhbLEDiTmRVg7WWYJW41F2L8 x5s2G5KkGdG8t5ygPnVAWqPYBQAEJ4U0nGkRe4ZuWqUfxc3Mk1X8zDzSthIDNpzZckKWYtYiEaIjL EvGTJN/Q==; Received: from authenticated user by zero.zsh.org with local id 1oEJz1-0008AR-Rj; Thu, 21 Jul 2022 00:24:03 +0000 Authentication-Results: zsh.org; iprev=pass (wout3-smtp.messagingengine.com) smtp.remote-ip=64.147.123.19; dkim=pass header.d=ajrh.net header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=none header.from=ajrh.net; arc=none Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:48657) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oEJtu-0006XU-5u; Thu, 21 Jul 2022 00:18:47 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id AFBDA32008FA for ; Wed, 20 Jul 2022 20:18:44 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by compute3.internal (MEProxy); Wed, 20 Jul 2022 20:18:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ajrh.net; h=cc :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1658362724; x=1658449124; bh=E6KOE6uPo0 brgcKZiCIltuUk7TP75Lr+WQ8PHGMx+ME=; b=GCAWPmR08zf1g6mYdM63PmJ/A6 j2zPPMuppK1bXOK0Q2WeEgzHMe5AfrMspiT2Pu4H7ekz4LRPb7Z1h2nCinAdbPL/ yXW+NeExnpIQrF0NT3xlHLU184K9s/4oYlfZv4aoM2iHWwo7sYQQpLZLo7A9IxPu RcwpxpbBaXqMfP5DAUD3hOopiLFlUH+fBvqTT79tJQoOSjM4p1koFFZJn+AzXXUc 9zgq7GoXkPcZBjIpkcvnXZgehyy+pygJCssauLxcGHFidb+EH65RFGoagHtH1utE hw1faP24sXRWWC51KdkGyghrqINlgR60b/P9pyxK+CwazJAfjcpCyRx1FgZw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1658362724; x=1658449124; bh=E6KOE6uPo0brgcKZiCIltuUk7TP7 5Lr+WQ8PHGMx+ME=; b=bueR48o32Z4oNA2ie68hP9qPy9A7mL7mX4+sM+o3TKAd cxUbRpswSykF57xhtO6JkMXhXocNnNaAi2usQzirMmja+IS1p5BoZYO/Zew+Emfs GnOINyU+3kXNPJwdOnqD/7V0u4WkIjrnsdaU1Oo8MSaXU8teN34GbDEnmX7ApcF1 2HBiy2/sEioskNnOvdluBzRSHuPDSK++8aUDb7W38wESFCu1E0HdKv5C6mtp77dO CG40o9o/BMK7C6Bkl53ZIgsKFSlLVIVUFcwJfl3XO8yhSIYR6MZ9TUl04xaYxCfh F9gH54Gf7/AM8Tm7v1k2ltHm/AtrgsVvYPeVcjLrew== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudelfedgfedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderredtnecuhfhrohhmpedftehnthhhohhnhicujfgvrgguihhnghdfuceorghjrhhh segrjhhrhhdrnhgvtheqnecuggftrfgrthhtvghrnheplefhvdejiefgfefhledvvedute eileefgfdvleehueeuieduffevtedttdejveeknecuvehluhhsthgvrhfuihiivgepuden ucfrrghrrghmpehmrghilhhfrhhomheprghjrhhhsegrjhhrhhdrnhgvth X-ME-Proxy: Feedback-ID: i6aa94791:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0B72415A0087; Wed, 20 Jul 2022 20:18:43 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-755-g3e1da8b93f-fm-20220708.002-g3e1da8b9 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <28c00da7-cfdd-4f58-a539-8deebbe5dfa5@www.fastmail.com> Date: Wed, 20 Jul 2022 20:18:19 -0400 From: "Anthony Heading" To: zsh-users@zsh.org Subject: Re: view onto command pipeline? Content-Type: text/plain X-Seq: 27910 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 Wed, Jul 20, 2022, at 3:27 PM, Phil Pennock wrote: > function git { command git -c color.ui=auto "$@" } Maybe you missed the clever bit that Bart helped with? As far as I know, these 'auto' settings can only detect a tty, they can't detect a pipe that happens to feed a tty. Hence the panoply of command-line options and environment variables that Unix color needs. I had been wondering about OS support to create a more standard mechanism, but it seems impossible? A fcntl(F_TTY) flag bit that can be set on a pipe to hint that it should be treated like a tty would seem like a start, but maybe nothing short of an end-to-end handshake negotiation along the pipeline is going to work, and then maybe that's not Unix any more. Obviously yes git has an automatic pager option, probably as another workaround for this, but personally I just want to type '| less', invariant to whether I'm running git diff or plain diff. For the same reason agree the -t 1 test might be redundant for the default git config, but not for all other commands or scenarios.