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 3476 invoked from network); 19 Jan 2021 23:48:59 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Jan 2021 23:48:59 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1611100139; b=GN7MyJWRmtTpkmJdOEmC/OdC8ZVMfPdyQoIkK4yETzJOB6Bd6BMy1p/y30eq5Bu6hFUgIIGbiN Ov9JTrMOLujGk27rRE9Yle5DwYumwz0f+5xGJ8LgoMoOoDT9pX23dPtr7QApr46fb93e1jsztn RWznB05yUNrHa8vy+C+YAXiIUk96HdfeA7mKi9aKqF0kUEgSS7HHn5niI13C9lpuWibWQ7AO2o jpkh8fbFbenZs6gxXLBjNCbWlBI4cfWP/6CzREqnWqG9HiLMcnFf5FcRvCPPhhubxKepr1AobV mP3+QcLImFRlGQFtUz5R+szd6dj+7gRznFphV0jVo75Uag==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; 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=1611100139; bh=7gAUEou6et5qsdQIvNmNjZJoWSXPd1md0AmsHOxlFJc=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:DKIM-Signature; b=K3FEcnU0sglAjuOEtGyZIggs4Nf5QYuLjQBd0jtAOQM8+3TkYQ7YlPG6SCgOGSBz0EsfO1h2KK MBV12+mNcb5hHrKju58y3ob25zo0kXTd8nJUJUoM/dHTiGzFy5qei4L7Rt5vf/4ZpSsJ6xuxZV B7wu3+RtBYRNbqYJpEaU2wRmHRZw9NInmDQ9SbtEpp33mQt53Nwml/7CHJ7m/e1nUw8PN5C3g5 +CPEFaDxFgn7P+N2t+xQzf0N7SE5t/BytdEJX8m2HneexjzNCe8ugkpwA9TY9mXLd8AKj4SLsM riwaawZnfzKRC3pef5Fh0dA3uegVSlpnr4TBEb2OhHdAnQ==; 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:In-reply-to:MIME-version:Date:Message-id:From:References:To: Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=pLfCC6r/gc++3JqeDOiza82FUke2dNF69NswjvFYIoQ=; b=ZzE05uiesdqr0080LXLIkxrYZV jn68v6S7uKktO86qPxLjuMy/SmNDi7jt6ZosKXf/3PoeZYtvaCxu7wRBsipmYPXgo6SBqXjVpeMox JmpqA/ekn+5aORNAgWudC//tMTqXhKGmvQy5TLLWsEAWa5y0bFu7ttRcQLZu9SdqY3g8nF0gF559w 0UbRXOXSUIKNqvPKAfwWCGnZG3BDK/mdI8pE7oSsrp/OEWdiKW0wEgcPyTXyihBSancBqjPWBN1eS gdXa1Wt2R81ZsFvWJn7/vFbnUud2QPC3kNt9aDTaBHTD6IuU5EBcPj3kRG0KD5pz+XrEStKpJJJ2m 23QKuX/Q==; Received: from authenticated user by zero.zsh.org with local id 1l20k7-000EWd-9L; Tue, 19 Jan 2021 23:48:59 +0000 Authentication-Results: zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none Received: from mta03.eastlink.ca ([24.224.136.9]:42436) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1l20jY-000E8b-Ig; Tue, 19 Jan 2021 23:48:25 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta03.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0QN700M5KCGGBBY0@mta03.eastlink.ca> for zsh-users@zsh.org; Tue, 19 Jan 2021 19:48:22 -0400 (AST) Received: from [192.168.0.3] ([24.207.90.194]) by Eastlink with ESMTP id 20jWlBx2fDl3l20jWlwBEF; Tue, 19 Jan 2021 19:48:22 -0400 X-Authority-Analysis: v=2.4 cv=HJEGqqhv c=1 sm=1 tr=0 ts=60076fc6 a=zv49KfEsxEDzuN5AGO7r0Q==:117 a=zv49KfEsxEDzuN5AGO7r0Q==:17 a=IkcTkHD0fZMA:10 a=gir0-LH0AAAA:8 a=ZqDU2K3FvqTbVIcnmCYA:9 a=QEXdDO2ut3YA:10 a=aLewGyoHDmJ4ULJHWpSz:22 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddugdduhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpeekvdeuuefffefhvdeuieetffdvtddvjeegueejkeeiudehieetieehgeetvdfhfeenucfkphepvdegrddvtdejrdeltddrudelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrledtrdduleegpdhhvghloheplgduledvrdduieekrddtrdefngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-IP-NOAUTH: 24.207.90.194 Subject: Re: xargs with zsh function To: zsh-users@zsh.org References: <6c7b3cb6-5c0d-e9ae-67ea-a194cf9f9181@eastlink.ca> <7025ab43-7e15-df70-d09f-91ebaae2b7f2@eastlink.ca> <8868DABE-1D18-400F-A8F7-31450A892F0D@larryv.me> <161abccc-2323-8f22-70f9-f5edf59a61e7@eastlink.ca> From: Ray Andrews Message-id: Date: Tue, 19 Jan 2021 15:48:22 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 8bit Content-language: en-US X-Seq: 26401 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 2021-01-19 1:39 p.m., Bart Schaefer wrote: > On Tue, Jan 19, 2021 at 12:27 PM Ray Andrews wrote: >> My strong preference would be that zargs be agnostic as to one's >> environment and functions called by it would behave exactly as >> otherwise. > That's what the zargs_patch.txt in my other message is supposed to do. > >> I'd like to be able to link my functions together >> via piping+zargs. > Pipelines are for linking together things that expect to read standard > input and write standard output. > > foo | bar > > is the same as > > foo > file > bar < file > > except that the file is being simultaneously written and read The above is much easier to understand and of course obviously simpler.  As I said, the whole thing is a bit of a mystery.  A lot of stuff attaches to ' | ' obviously. > If you rejigger them into a pipeline, you > force some of them into background subshells, and those are no longer > able to affect the current shell. That may or may not be OK, but you > should think about it. Well again I have no idea what the intimacies of it are but at least the notion of being able to link functions analogously to what xargs does is desirable.  If you have a patch that does that for zargs I'd sure like to have it.