From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id fecddeb6 for ; Wed, 3 Jul 2019 18:28:34 +0000 (UTC) Received: (qmail 28221 invoked by alias); 3 Jul 2019 18:28:28 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44490 Received: (qmail 11772 invoked by uid 1010); 3 Jul 2019 18:28:28 -0000 X-Qmail-Scanner-Diagnostics: from st43p00im-zteg10063501.me.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25496. spamassassin: 3.4.2. Clear:RC:0(17.58.63.176):SA:0(-2.7/5.0):. Processed in 1.824352 secs); 03 Jul 2019 18:28:28 -0000 X-Envelope-From: whereislelouch@icloud.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at icloud.com designates 17.58.63.176 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=04042017; t=1562178472; bh=rHEE3m1oXFHqI+N+jyZwWacJR6+4o/GMTXQLR/ZMQs4=; h=Content-Type:Subject:From:Date:Message-Id:To; b=c9K3Ezbo1t0S86M+IurDwPteSRWs5qdOYQ9SXa2pCx1bGosR7Ng3aGDgXCnev4jIS G7dKWs9IW9HaOH9lr5SJq0CuZaHCIwxQoZWHWElSxYGmy6l/NWZd76RkL67bgNWPiC fJCi+megw6Qf114OLLY0MiW0t/l0+vYlWRWCdaSqg1SI10XuILOamjcP9+4tsXkVAB dny+dCY2OOnuHPGblxJ5ebcCUiQpwRYjxqjTDrZS+7KV00nITfu/pP3HQDiyPhQNLA hhvy6plrjlTux0Jm0THDJlmoZLLjDJGW5pl1SPdjXUfe46oB6hDnB7iusE7MVfe2C8 FvniMo3MII2iw== Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: Zargs bug From: Aryn Starr X-Mailer: iPad Mail (16F203) In-Reply-To: <20190703180558.tq7hwgrtajgq35ds@chaz.gmail.com> Date: Wed, 3 Jul 2019 22:57:48 +0430 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: <4107D202-9060-4387-89B6-AB41B27F1F3F@icloud.com> References: <20190703180558.tq7hwgrtajgq35ds@chaz.gmail.com> To: Stephane Chazelas X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-07-03_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1812120000 definitions=main-1907030225 I suggest adding an option flag for not using the subshell if it=E2=80=99s e= asy to do so.=20 I currently reimplemented this application with this function: rexa () { local i for i in "${@:2}" do eval "$(sed -e "s/_/${i:q:q}/g" <<< "$1")" done } It seems to be working. > On Jul 3, 2019, at 10:35 PM, Stephane Chazelas wrote: >=20 > 2019-07-03 22:08:04 +0430, Aryn Starr: >> I run this line: >>=20 >> $ zargs -t -i _ -- ceer whh -- compdef _=3Dwhich >> compdef ceer=3Dwhich >> compdef whh=3Dwhich >>=20 >> But the completions don=E2=80=99t activate. When I manually run >> =E2=80=98compdef ceer=3Dwhich=E2=80=99, though, it works flawlessly.=20 > [...] >=20 > zargs runs the commands in a subshell, so they can't affect the > current shell environment. >=20 > Same as if you'd run: >=20 > (compdef ceer=3Dwhich) >=20 > AFAICT, it's not documented but the code of zargs has: >=20 > # Everything has to be in a subshell just in case of backgrounding jobs, > # so that we don't unintentionally "wait" for jobs of the parent shell. >=20 > --=20 > Stephane