Discussion:
[ast-users] "next" array element doesn't reset to 0 after last element is unset
Aaron Davies
2015-09-20 21:57:11 UTC
Permalink
found this while trying to answer this stackoverflow question http://stackoverflow.com/questions/30321798
typeset -a a
a+=(1)
0
unset a[0]
typeset -p a
typeset -a a=([0]=)
a+=(1)
1
typeset -p a
typeset -a a=([1]=1)
imao it shouldn't be stateful like this
--
Aaron Davies
***@gmail.com
Loading...