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,NICE_REPLY_A,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24872 invoked from network); 20 Jul 2022 12:23:20 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 20 Jul 2022 12:23:20 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1658319800; b=I0LcEFOR3PjPU4Gwl32yQ2lJH6YFjOXbEnpRF4r25WDXbMCYTwBbyx18aZzfE+YeRsS7+XHiLG gaOu0BU0gPqF9GwzuacwQJMmeRI47KyVS6k5PQL9SZkbBnBDzUW+SyTTpQAyUZ8Idp27VSWofL 4sDr7ASbc7DAoGKLo3bgkpFs+TYQrbHiDV72wES6paZmuE7Isghli98h0SjrQRHHMoExRbEACb uibVHWZ/amu2cIJvUXQqEUUDYdb1pwOuARd2eHcJn8lqpvJ9WENDH3x5DPmxBOondDg0h/0bMO Or1bMQL/7OibfL2pZHK6+n7PjefN09o+81n6tjuAyB/cbg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out1-smtp.messagingengine.com) smtp.remote-ip=66.111.4.25; dkim=pass header.d=luffy.cx header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=pass header.from=luffy.cx; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1658319800; bh=FVZ0lOLgR6vzkrYug2FDUHVK6WQHd4Bfeyi/W51tABk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=CxBigxZ/CMtN3CngcXmsGMnT4bpaqJPXMl9vBI1X6R5VmGZljnDUCXBaEgponYVh6k10FnZPbP Yboie3c2C3s4QFjCtIgJZrKv243/LhvQ9xQIKheBdO4fL/yYUENQOZgoMqZE5I+dlq3kDJvBHF d8FRU8YH34kPH+cXfWRpAx8ziXiCbIsoFr7kv7R57C2R9Ch0HfS8lvPe0HKfUg7OUzOdu2u8KU 7iKCCGEYxSgw7uI5eBndKpM3Pv2X8pum2cL23HQusTkXaXWiPSrY5aPNMiIpL7HY7Z5njGC1xU uRhg5PkCFyAPriaQNo8Skp04KtGVKS/QF9eLDNjGmvHKtQ==; 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-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=pyYowGsM5ZjV/MVHQ9Lzfh9EO7arQ6cf3Fh33eq4/3U=; b=BNCEpIi/WKzTYy0V4LHP4MjaQF tAj6L0N2Fcb2ghW7A8hlZMx/facmWBWYSfY8PKt2Qbih9rTouUg/3ENFUffBDjpokZHefJjzdSBMk imFGBAFfEIps7X9S9148dB8YBydsAb2A/2yh7DkV1lEziuYaX9pYe9uz3CvQlBjWiSkUp6Q90NKyj T2sMIuAIhH+iY5oN2EcZqIwkB9AS1oJ+h7nPEEeZlbG7rBNCsCwAg2Foo6Sf0pP01QX/IW2/K9gQ0 MGK+uCzyowXK9jZkOrnGU64MTG9tRxUOoY8CPGEjQPqCcMATYaL2OvQNnjEax6g8Ow/dERDedAKzV jQ4C2ysw==; Received: from authenticated user by zero.zsh.org with local id 1oE8jX-00091G-AQ; Wed, 20 Jul 2022 12:23:19 +0000 Authentication-Results: zsh.org; iprev=pass (out1-smtp.messagingengine.com) smtp.remote-ip=66.111.4.25; dkim=pass header.d=luffy.cx header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=pass header.from=luffy.cx; arc=none Received: from out1-smtp.messagingengine.com ([66.111.4.25]:33081) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oE8ie-0008KA-T2; Wed, 20 Jul 2022 12:22:26 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C821E5C00AF for ; Wed, 20 Jul 2022 08:22:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 20 Jul 2022 08:22:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=luffy.cx; h=cc :content-transfer-encoding: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=fm2; t=1658319743; x= 1658406143; bh=pyYowGsM5ZjV/MVHQ9Lzfh9EO7arQ6cf3Fh33eq4/3U=; b=e 2huw+1v+yAfwsn0VkztjU7gaA2btTAHgGDJbLSfqklbBN/4l4H1Ha5y+hdXXWmlp UcwjfdzEhm4M5R6Z70ZNeAx8bOR396zh3a4Du9k10G/AIhtD5PqrcQinKEVzFb2P s7ExmuLVJ4hhzX5jH59xueU2AbMN06ngOAFmI722OPx0WpadheQQLqOmCvK/hYRD STHESSpAKWysGo7cOFLWAn+w4eEBxCUdLY3CBbHJ3IuYxKzcTaHPNFxAekzQDICo RynXAZt7LlCDKH9+HUgtp1JhtwtlP+2gO8OBSaGDL65O2FSl6fnuyKcVlKoMyBjw BB5/y05UjC8a4MgF4I1Ug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=1658319743; x=1658406143; bh=p yYowGsM5ZjV/MVHQ9Lzfh9EO7arQ6cf3Fh33eq4/3U=; b=M4UZhFHDITCMMTIv0 LyOPTyDKtDyQ17CVrb0wcR5SyNou5otVP2IP4KH0LBuoW9wQTLWd/9S0cuzvn8mm B/OS5NwZAxboN/YU4yxdqNH2W7GKrFy5JBuO0mg4Tdc3k3Qjh1TGOsk6rd4TLObc 0PUhFdQGmOQtl4yM7KdqkG3sq01cCFaACm0LBL04v7hyDPSD3MOvbF0xIcpjNcxN l3vOsKczlNq0AcUPykBXGYepV5qnomKi4MH+VF0S9rDeem9NnnbnWN0sGmC72kp8 I45nMOSRb/OySDrEkXzFt6p1ScD3feuaEkx+nFzy90iF5FqEr+8c0U5KtyLZREqe z7Aww== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudelvddghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtke ertddtfeejnecuhfhrohhmpeggihhntggvnhhtuceuvghrnhgrthcuoegsvghrnhgrthes lhhufhhfhidrtgigqeenucggtffrrghtthgvrhhnpeeitdevfefhvdekvdevgeeileejvd ejudeuheeuffetudffgeegffetueegteffueenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpegsvghrnhgrtheslhhufhhfhidrtgig X-ME-Proxy: Feedback-ID: i34d144f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 20 Jul 2022 08:22:23 -0400 (EDT) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by neo.luffy.cx (Postfix) with ESMTP id 9F414125 for ; Wed, 20 Jul 2022 14:22:21 +0200 (CEST) Message-ID: <978d1a3f-8d21-6a2b-02c4-4e7c56e6ee72@luffy.cx> Date: Wed, 20 Jul 2022 14:22:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Thunderbird/104.0a1 Subject: Re: view onto command pipeline? Content-Language: en-US To: zsh-users@zsh.org References: <28c00da7-cfdd-4f58-a539-8deebbe5dfa5@www.fastmail.com> From: Vincent Bernat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Seq: 27903 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 2022-07-20 13:37, Dominik Vogt wrote: > On Wed, Jul 20, 2022 at 07:23:46AM -0400, Anthony Heading wrote: >> local opts=() >> if [[ -o interactive && ( -t 1 || -n $pager ) ]] >> then >> opts=(-c color.ui=always) >> fi >> command git $opts $@ > > For proper handling of whitecpace in options and arguments: > > command git "${opts[@]}" "$@" > > Otherwise, if you have, say, files "a", "b" and "a b", > > $ git commit "a b" > > Would commit a and b but not "a b" if the $@ is not quoted. As a > rule of thumb, _never_ use unquoted variables in shell scripts. I don't think this is true for Zsh. 14:21 ❱ f() { print -l $@ } 14:21 ❱ f a b a b 14:21 ❱ f "a b" a b