shfmt

A shell script formatter supporting POSIX sh, Bash, and mksh

Miscellaneous Go

shfmt formats shell programs. It supports POSIX Shell, Bash, and mksh, and can detect the shell variant from shebangs.

Installation

brew brew install shfmt