CmdID

CmdID / Commands

shfmt

Shell parser, formatter, and interpreter. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Print a formatted version of a shell script

shfmt path/to/fileIdentify

List unformatted files

shfmt --list path/to/directoryIdentify

Write the result to the file instead of printing it to the terminal

shfmt --write path/to/fileIdentify

Simplify the code, removing redundant pieces of syntax (e.g. removing "$" from vars in expressions)

shfmt --simplify path/to/fileIdentify

Specify the amount of spaces to use for indentation (0 for tabs, which is also the default)

shfmt --indent 4 path/to/fileIdentify

Format the code according to Google's style guide

shfmt --indent 2 --case-indent --write path/to/fileIdentify