mvdan / sh

A shell parser, formatter, and interpreter with bash support; includes shfmt
https://pkg.go.dev/mvdan.cc/sh/v3
BSD 3-Clause "New" or "Revised" License
7.21k stars 339 forks source link

cmd/shfmt: link to web demo or playground #941

Closed l0b0 closed 4 months ago

l0b0 commented 1 year ago

shfmt is a great tool, and it would be fantastic if it was more widely adopted. Unfortunately many potential users don't have an easy way to run it: the only *nix machines they have access to are managed by others, and they don't have the expertise to set up something like a VM. To help those users out, I'm wondering if someone would be willing to host a playground like ShellCheck where users can simply paste their code and get a formatted version back in another part of the page.

mvdan commented 1 year ago

Not sure if I follow: the releases contain binaries for both Windows and Mac. There are also plugins that integrate the tool with IDEs like JetBrains, I believe.

Totally fine with me if someone hosts a site that acts as a web playground, though. Happy to link to it in the README.

l0b0 commented 1 year ago

Not sure if I follow: the releases contain binaries for both Windows and Mac. There are also plugins that integrate the tool with IDEs like JetBrains, I believe.

A lot of people work in environments where they are not allowed to install any software whatsoever. A lot of people are also developers second, and an IDE is too complicated for what they are doing. So they effectively have no easy way to run shfmt, and a web site would be an excellent way to format the tiny handful of files they have to deal with.

mvdan commented 1 year ago

Sure, no disagreements there. Still happy to link to a website doing this if someone implements it. I don't have time for it myself in the short term.

mvdan commented 4 months ago

I'm going to close this for now, given that noone seems to have interest in building one. If someone does build one, I'll happily accept a PR that links to the website.