Closed coiby closed 1 month ago
Thanks for reporting this. As far as I can tell, the behavior in terms of parsing is correct - shell_variant = posix
is applied from EditorConfig like a -ln=posix
flag, so you are actually parsing in POSIX mode. It's the error message which is wrong and very confusing. I've fixed that now.
Thanks for coming up with a fix quickly!
I have one question. In the reproducer, the shebang is !/bin/bash
. So do you imply EditConfig will overwrite shebang?
Problem
shfmt makes the following complaint,
which doesn't sound reasonable to me because the script is already parsed as bash
How to reproduce it