Closed rjmccabe3701 closed 5 years ago
The bug seems to be how IFS is set when run from zshdb. To see this consider simpler program:
arr=($(echo -e "1 2 3"))
typeset -p arr
When run from zsh you get:
typeset -a arr
arr=( 1 2 3 )
while inside zshdb you get:
(/tmp/zshbug.sh:1):
arr=($(echo -e "1 2 3"))
zshdb<4> c
typeset -a arr
arr=( '1 2 3' )
Explicitly setting IFS helps in the above. That is. changing the program to:
IFS=" "
arr=($(echo -e "1 2 3"))
typeset -p arr
fixes the problem.
I won't have time in the near future to track this down further.
Sorry for the delay. Better late than never I suppose - think of the children.
Consider the simple zsh script:
This has the obvious output when run outside zshdb:
When run within zshdb the output is this:
i.e. the arr array variable now only has a single element.
I ran the same script (changing #!/bin/zsh to #!/bin/bash) in bashdb and it works as expected.
I'm running on ubuntu 14.04 with