zsh-workers
 help / color / mirror / code / Atom feed
From: frederik@ofb.net
To: dana <dana@dana.is>
Cc: Zsh Workers List <zsh-workers@zsh.org>
Subject: Re: unreproducible bug with ${=...}
Date: Sat, 14 Dec 2019 10:10:31 -0800	[thread overview]
Message-ID: <20191214181031.l7z6atr6cafe4dwj@localhost> (raw)
In-Reply-To: <5A850345-D71E-4CA9-967E-967CE6159A43@dana.is>

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

      reply	other threads:[~2019-12-14 18:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-14  4:53 frederik
2019-12-14 15:59 ` dana
2019-12-14 18:10   ` frederik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191214181031.l7z6atr6cafe4dwj@localhost \
    --to=frederik@ofb.net \
    --cc=dana@dana.is \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).