preface

ZSH: ZSH: Bad pattern is displayed when creating git branches using ZSH

The solution

Single solution (without cure) :

unsetopt interactivecomments
set -2
Copy the code

For good:

vim ~/.zshrc
Copy the code

At the end of the open file add:

Unsetopt INTERACTIVE_COMMENTS # No bad pattern unsetopt BAD_PATTERNCopy the code

Save and exit using:

source ~/.zshrc
Copy the code

Make the modification take effect.