If trying to run a for loop or even an aws list command in zsh and bash shells on my new mac the shell clears the terminal and I get something like
for
aws list