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.

安装

brew brew install shfmt