i usually interate thru indexed arrays as, i=-1, while [[ -v arr[++i] ]],
but it suddenly stopped
maybe cause i switched to in-functions than aliases use

bash-5.1# cat int.fail
int() {
 declare -a int
 declare i=-1 now

 while [[ -v int[++i] ]] && now=${int[i]} ; do
  printf %s\\n "$now"
 done
}

int=( a b c )
int
bash-5.1# bash int.fail
bash-5.1#

again it used to work this way, just maybe with functions not
is it a a bash bug ? is it my bug ?

Reply via email to