There is no single Bash standard to follow, only a few guidelines. One way you can check for some basic errors and formatting would be using an editor with support for Bash (in best case with a builtin LSP). At the end, you have to find your style and coding standards or adapt what others do if you want work with them or edit their files.
- Otherwise there is a well known tool for checking Bash files: https://www.shellcheck.net/ You can use it online and as a downloaded program on your local machine. After using shellcheck for a bit I got used to some of its conventions and recommendations, such as always wrapping variables like in
${variable}
and some other things. - Google has a coding style guide, but not everyone likes it: https://google.github.io/styleguide/shellguide.html
- Related is the Bash Reference Manual from GNU: https://www.gnu.org/software/bash/manual/bash.html Off course this is not a guide on how to style or program, but it helps in understanding how GNU does things.
BTW the mk-blog link is 404 for me.
I’m a little bit surprised or confused here. Polonium is an external script. KDE/Kwin specifically addresses scripts? That’s actually wonderful, totally the opposite of what Gnome does (yes, I had to bring it up).
I stopped using Polonium, as it does not work perfectly fine for me. I’ll let them cook a bit more, its otherwise an excellent script/addon.