Skip to main content
1 of 2

Zsh Expanding Variables into Arrays or Lists

I looked through some of the posted threads and none of them cover my query.

I have a simple line of code below which prints all the ASCII characters:

echo {' '..'~'} 

I want to be able to use a variable to substitute this array like below

list="{' '..'~'}" 

and then do the following

echo $(print ${list})