Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

using array slice as lvalue



Hi,
I execute the following:

arr=(a b c)
arr[2,-1]=(z)
typeset arr # arr=(a z b c)
arr[1,-1]=(z)
typeset arr # arr=(z)

In the first slice assignment, the rvalue was inserted into the array
before arr[2], and the second slice assignment, the slice is assigned
to the rvalue.  Is the first behavior a bug?

--
Le



Messages sorted by: Reverse Date, Date, Thread, Author