Didn't test yet but I'm pretty sure this will work in MSYS2 as well.
But more than that, I would agree with @elextr that the plain `echo` solution in #2055 is very safe. The drawback is just that the number of dashes is constant and so might be a little less eye-candy compared to the dynamic version. Therefore it needs just an `echo` :).