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.0 required=5.0 tests=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 3b06393c for ; Sat, 14 Dec 2019 18:11:15 +0000 (UTC) Received: (qmail 13815 invoked by alias); 14 Dec 2019 18:11:08 -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: 45027 Received: (qmail 26431 invoked by uid 1010); 14 Dec 2019 18:11:08 -0000 X-Qmail-Scanner-Diagnostics: from egnor-li.ofb.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25656. spamassassin: 3.4.2. Clear:RC:0(23.92.24.4):SA:0(-2.0/5.0):. Processed in 2.912197 secs); 14 Dec 2019 18:11:08 -0000 X-Envelope-From: frederik@ofb.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at ofb.net designates 23.92.24.4 as permitted sender) Date: Sat, 14 Dec 2019 10:10:31 -0800 From: frederik@ofb.net To: dana Cc: Zsh Workers List Subject: Re: unreproducible bug with ${=...} Message-ID: <20191214181031.l7z6atr6cafe4dwj@localhost> Reply-To: frederik@ofb.net References: <20191214045330.ehxgsufhhphg3twv@localhost> <5A850345-D71E-4CA9-967E-967CE6159A43@dana.is> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <5A850345-D71E-4CA9-967E-967CE6159A43@dana.is> Sender: Thank you dana for the reply. On Sat, Dec 14, 2019 at 09:59:49AM -0600, dana wrote: >On 13 Dec 2019, at 22:53, frederik@ofb.net wrote: >> P.S. I switched to using "zip" expansion, as suggested by Mikachu on IRC, >> which seems more elegant and doesn't use IFS: ${${:---exclude}:^^excludes} > >In this case you could also just do: --exclude=$^excludes Thanks, that's a good point, what with rsync following the GNU long option conventions. >As to why your ${=...} result sometimes differs, the most obvious thing that >comes to mind is IFS getting changed somehow. But i don't know how that would >be happening intermittently. As far as debugging, i guess just add logging to >show what IFS is set to immediately before the command, and/or run the script >with -x if you can? Yeah, by the time I made that edit to print IFS, I was having a hard time reproducing. I do have a shell function which I use a lot that sets IFS within a () subshell. That's the only occurrence of the variable in my .zshrc. Thanks, Frederick