zsh-workers
 help / color / mirror / code / Atom feed
* string[x,y]=foo assignments where y < x
@ 2022-09-20 12:53 Stephane Chazelas
  0 siblings, 0 replies; only message in thread
From: Stephane Chazelas @ 2022-09-20 12:53 UTC (permalink / raw)
  To: Zsh hackers list

$ 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:

a[4,3]=XX

or

a[3]+=XX

to get the behaviour I expect

-- 
Stephane


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-20 12:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20 12:53 string[x,y]=foo assignments where y < x Stephane Chazelas

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