Putting any newlines after the command substitution in its own quotes with a dollar...
I'm running into the same thing when trying to use the git-prompt in MSYS2. $ PS1='\w...
Judging by the fact that it says "1.9.2.msysgit" in the version number, I'm guessing...
pacsearch producing strange warnings