Open ccoVeille opened 4 months ago
I'm not sure about the consequences of the things I'm raising, but at least now you know they exist
Hmm, as far as I can tell shfmt doesn't have any issues formatting lines starting with $
(But it can't parse mdsf format <PATH_TO_FILE>
which is rather ironic).
$ cp foo bar
$ touch foo
$ date
Tue Apr 2 23:54:37 CEST 2024
Becomes
$ cp foo bar
$ touch foo
$ date
Tue Apr 2 23:54:37 CEST 2024
From a ux perspective I would personally expect any block tagged with shell
/ sh
to be formatted using the shell formatter, whether it has a shebang or not. But I can definitely see your point.
I am honestly not sure what makes most sense 😅
Yes, exactly. My idea was for your to have this in your mind. Maybe add a test or twos.
So you can see how things evolve.
Because developing is east, maintaining is hard. So having unit tests is always better.
shfmt is made for formatting script, definitely.
$ command result