shfmt
Format shell scripts into a consistent and readable style.
mvdan · Code and testing
GitHub projectOpen source Open on GitHubHow to try it
Open the v3.14.1 GitHub release and download the Linux build. Format a short conditional using two-space indentation.
What we tested
v3.14.1. Format a short conditional using two-space indentation. Inserted the expected space and indentation in the sample shell script.