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

Re: Should zipping two empty arrays result in empty string?



Isn't this identical to

% for i in "" ; do typeset -p i ; done

which yields exactly one iteration, as I would expect?


Kannan

On 12/31/16 7:49 PM, Eric Cook wrote:
The following code results in a single loop

a=() b=(); for n in "${(@)a:^b}"; do typeset -p n; done
typeset n=''

My question is, would anyone expect that? or would the you expect
nothing to expand, resulting in the loop not iterating?



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