Problem with snippets in Zsh

I recently changed my shell from bash to zsh. I have lots of snippets (Alfred, Dash...) for terminal use that ends with a line break. With bash that snippets works fine, I meant, paste the command and execute it (as ends with a line break).

The point is that in zsh, doesn't work as I expected. The snippets paste the code and add a line break, but without executing the command. Is there any way of fixing this?

I'm using iTerm.


Solution 1:

Adding unset zle_bracketed_paste in ~/.zshrc file ZSH will treat newlines in snippets as ↩.