help / color / mirror / code / Atom feed
From: Stephane Chazelas <stephane@chazelas.org>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: string[x,y]=foo assignments where y < x
Date: Tue, 20 Sep 2022 13:53:24 +0100	[thread overview]
Message-ID: <20220920125324.qdnixpbebacvbenm@chazelas.org> (raw)

$ zsh -c 'a=abcde; a[4,0]=XX; echo $ZSH_VERSION $a'
5.9 abcXXabcde

I expected abcXXde like for:

$ zsh -c 'a=(a b c d e); a[4,0]=XX; typeset $a'
a=( a b c XX d e )

Is that expected behaviour?

In any case, I can always do:




to get the behaviour I expect


                 reply	other threads:[~2022-09-20 12:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

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

  git send-email \
    --in-reply-to=20220920125324.qdnixpbebacvbenm@chazelas.org \
    --to=stephane@chazelas.org \
    --cc=zsh-workers@zsh.org \


* 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


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).