In case anyone is curious, that crap in the commands he posted is a feature called
bracketed paste mode. I don't use Msys2, but I assume that he pressed some other key sequence before pasting, which activated bracketed pasting. For example, on some Linux terminals, you can activate it by pressing escape right before you paste.
Oh whoops. I have no idea what that means, but cool.